diff --git a/src/bin/dummy.rs b/src/bin/dummy.rs index 4c5d09d..21a4a78 100644 --- a/src/bin/dummy.rs +++ b/src/bin/dummy.rs @@ -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() { diff --git a/src/calendar/cached_calendar.rs b/src/calendar/cached_calendar.rs index d9f9ade..b94a00c 100644 --- a/src/calendar/cached_calendar.rs +++ b/src/calendar/cached_calendar.rs @@ -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 { + fn find_missing_items_compared_to(&self, _other: &dyn PartialCalendar) -> Vec { unimplemented!("todo"); } } diff --git a/src/calendar/mod.rs b/src/calendar/mod.rs index 768819d..2193a0c 100644 --- a/src/calendar/mod.rs +++ b/src/calendar/mod.rs @@ -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; diff --git a/src/client.rs b/src/client.rs index 4ab8570..2dd0570 100644 --- a/src/client.rs +++ b/src/client.rs @@ -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"); } diff --git a/src/provider.rs b/src/provider.rs index 4b0657d..612fa3f 100644 --- a/src/provider.rs +++ b/src/provider.rs @@ -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 { diff --git a/src/traits.rs b/src/traits.rs index 027378b..9ffbbae 100644 --- a/src/traits.rs +++ b/src/traits.rs @@ -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; diff --git a/tests/sync.rs b/tests/sync.rs index fac1423..4080eb8 100644 --- a/tests/sync.rs +++ b/tests/sync.rs @@ -4,7 +4,7 @@ use chrono::{Utc, TimeZone}; use url::Url; use my_tasks::traits::CalDavSource; -use my_tasks::traits::{PartialCalendar, CompleteCalendar}; +use my_tasks::traits::PartialCalendar; use my_tasks::cache::Cache; use my_tasks::Item; use my_tasks::Task; @@ -76,8 +76,6 @@ async fn populate_test_provider() -> Provider