[minor] Fewer warnings

This commit is contained in:
daladim
2021-03-28 19:47:08 +02:00
parent 1451f41ae3
commit 364c91fed2
5 changed files with 115 additions and 102 deletions
+17
View 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;
}
+1 -1
View File
@@ -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;
+2 -3
View File
@@ -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]);
}