[minor] Fewer warnings
This commit is contained in:
parent
1451f41ae3
commit
364c91fed2
5 changed files with 115 additions and 102 deletions
|
@ -9,7 +9,7 @@ edition = "2018"
|
|||
[dependencies]
|
||||
env_logger = "0.8"
|
||||
log = "0.4"
|
||||
tokio = { version = "1.2", features = ["macros", "rt"]}
|
||||
tokio = { version = "1.2", features = ["macros", "rt", "rt-multi-thread"]}
|
||||
reqwest = "0.11"
|
||||
minidom = "0.13"
|
||||
url = { version = "2.2", features = ["serde"] }
|
||||
|
|
17
src/bin/dummy.rs
Normal file
17
src/bin/dummy.rs
Normal file
|
@ -0,0 +1,17 @@
|
|||
use my_tasks::client::Client;
|
||||
use my_tasks::settings::URL;
|
||||
use my_tasks::settings::USERNAME;
|
||||
use my_tasks::settings::PASSWORD;
|
||||
|
||||
|
||||
#[tokio::main]
|
||||
async fn main() {
|
||||
// This is just a function to silence "unused function" warning
|
||||
|
||||
let mut client = Client::new(URL, USERNAME, PASSWORD).unwrap();
|
||||
let calendars = client.get_calendars().await.unwrap();
|
||||
let _ = calendars.iter()
|
||||
.map(|cal| println!(" {}\t{}", cal.name(), cal.url().as_str()))
|
||||
.collect::<()>();
|
||||
let _ = client.get_tasks(&calendars[3].url()).await;
|
||||
}
|
|
@ -8,7 +8,7 @@
|
|||
//! A `Provider` abstracts these two sources by merging them together into one virtual source. \
|
||||
//! It also handles synchronisation between the local cache and the server.
|
||||
|
||||
mod calendar;
|
||||
pub mod calendar;
|
||||
pub use calendar::Calendar;
|
||||
mod task;
|
||||
pub use task::Task;
|
||||
|
|
|
@ -46,7 +46,6 @@ pub fn print_xml(element: &Element) {
|
|||
std::io::stdout(),
|
||||
0x20, 4
|
||||
);
|
||||
element.to_writer(&mut xml_writer);
|
||||
|
||||
writer.write(&[0x0a]);
|
||||
let _ = element.to_writer(&mut xml_writer);
|
||||
let _ = writer.write(&[0x0a]);
|
||||
}
|
||||
|
|
|
@ -1,9 +1,6 @@
|
|||
//! Some tests of a CalDAV client.
|
||||
//! Most of them are not really integration tests, but just development tests that should be cleaned up one day.
|
||||
|
||||
use std::error::Error;
|
||||
use std::convert::TryFrom;
|
||||
|
||||
use reqwest::Method;
|
||||
use reqwest::header::CONTENT_TYPE;
|
||||
use minidom::Element;
|
||||
|
@ -44,11 +41,11 @@ async fn test_client() {
|
|||
let calendars = client.get_calendars().await.unwrap();
|
||||
|
||||
println!("Calendars:");
|
||||
calendars.iter()
|
||||
let _ = calendars.iter()
|
||||
.map(|cal| println!(" {}\t{}", cal.name(), cal.url().as_str()))
|
||||
.collect::<()>();
|
||||
|
||||
client.get_tasks(&calendars[3].url()).await;
|
||||
let _ = client.get_tasks(&calendars[3].url()).await;
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
|
|
Loading…
Add table
Reference in a new issue