Fewer warnings

This commit is contained in:
daladim
2021-03-28 19:47:16 +02:00
parent caaddf910c
commit 4eb1ae2fb1
7 changed files with 6 additions and 21 deletions
+2 -1
View File
@@ -1,3 +1,4 @@
/*
use std::path::Path;
use my_tasks::{client::Client, traits::CalDavSource};
@@ -7,8 +8,8 @@ use my_tasks::settings::URL;
use my_tasks::settings::USERNAME;
use my_tasks::settings::PASSWORD;
const CACHE_FILE: &str = "caldav_cache.json";
*/
#[tokio::main]
async fn main() {
+1 -3
View File
@@ -1,5 +1,3 @@
use std::convert::TryFrom;
use std::error::Error;
use std::collections::HashMap;
use std::collections::BTreeMap;
@@ -103,7 +101,7 @@ impl PartialCalendar for CachedCalendar {
return None;
}
fn find_missing_items_compared_to(&self, other: &dyn PartialCalendar) -> Vec<ItemId> {
fn find_missing_items_compared_to(&self, _other: &dyn PartialCalendar) -> Vec<ItemId> {
unimplemented!("todo");
}
}
-7
View File
@@ -2,15 +2,8 @@ pub mod cached_calendar;
use std::convert::TryFrom;
use std::error::Error;
use std::collections::HashMap;
use std::collections::BTreeMap;
use url::Url;
use serde::{Deserialize, Serialize};
use chrono::{DateTime, Utc};
use crate::Item;
use crate::item::ItemId;
use bitflags::bitflags;
+1 -4
View File
@@ -2,18 +2,15 @@
use std::error::Error;
use std::convert::TryFrom;
use std::sync::Mutex;
use reqwest::Method;
use reqwest::header::CONTENT_TYPE;
use minidom::Element;
use url::Url;
use async_trait::async_trait;
use crate::utils::{find_elem, find_elems};
use crate::calendar::cached_calendar::CachedCalendar;
use crate::traits::PartialCalendar;
use crate::traits::CalDavSource;
static DAVCLIENT_BODY: &str = r#"
@@ -237,7 +234,7 @@ impl Client {
let el: Element = text.parse().unwrap();
let responses = find_elems(&el, "response");
for response in responses {
for _response in responses {
println!("(a response)\n");
}
+1 -2
View File
@@ -7,7 +7,6 @@ use chrono::{DateTime, Utc};
use crate::traits::{CalDavSource, CompleteCalendar};
use crate::traits::SyncSlave;
use crate::traits::PartialCalendar;
use crate::calendar::cached_calendar::CachedCalendar;
use crate::Item;
use crate::item::ItemId;
@@ -74,7 +73,7 @@ where
let server_mod = cal_server.get_items_modified_since(last_sync, None);
let server_del = match last_sync {
Some(date) => cal_server.find_missing_items_compared_to(cal_local),
Some(_date) => cal_server.find_missing_items_compared_to(cal_local),
None => Vec::new(),
};
let local_del = match last_sync {
-1
View File
@@ -5,7 +5,6 @@ use async_trait::async_trait;
use url::Url;
use chrono::{DateTime, Utc};
use crate::calendar::cached_calendar::CachedCalendar;
use crate::item::Item;
use crate::item::ItemId;