diff --git a/src/cache.rs b/src/cache.rs index 580a00a..cea07bd 100644 --- a/src/cache.rs +++ b/src/cache.rs @@ -24,7 +24,7 @@ const MAIN_FILE: &str = "data.json"; /// A CalDAV source that stores its items in a local folder. /// -/// It automatically updates the content of the folder when dropped (see its `Drop` implementation), but you can also manually call [`save_to_folder`] +/// It automatically updates the content of the folder when dropped (see its `Drop` implementation), but you can also manually call [`Cache::save_to_folder`] #[derive(Debug)] pub struct Cache { backing_folder: PathBuf, @@ -174,7 +174,7 @@ impl Cache { impl Drop for Cache { fn drop(&mut self) { if let Err(err) = self.save_to_folder() { - log::error!("Unable to automatically save the cache when it's no longer required"); + log::error!("Unable to automatically save the cache when it's no longer required: {}", err); } } } @@ -233,7 +233,7 @@ mod tests { let mut cache = Cache::new(&cache_path); - let shopping_list = cache.create_calendar( + let _shopping_list = cache.create_calendar( Url::parse("https://caldav.com/shopping").unwrap(), "My shopping list".to_string(), SupportedComponents::TODO, diff --git a/src/provider.rs b/src/provider.rs index b5278b4..3c9d3a0 100644 --- a/src/provider.rs +++ b/src/provider.rs @@ -321,10 +321,10 @@ where // TODO: implement update_item (maybe only create_item also updates it?) // if let Err(err) = cal_local.immediately_delete_item(&id_change).await { - result.error(&format!("Unable to delete item {} from local calendar: {}", id_change, err)); + result.error(&format!("Unable to delete (update) item {} from local calendar: {}", id_change, err)); } if let Err(err) = cal_local.add_item(item.clone()).await { - result.error(&format!("Unable to add item {} to local calendar: {}", id_change, err)); + result.error(&format!("Unable to add (update) item {} to local calendar: {}", id_change, err)); } }, } @@ -366,10 +366,10 @@ where // TODO: implement update_item (maybe only create_item also updates it?) // if let Err(err) = cal_remote.delete_item(&id_change).await { - result.error(&format!("Unable to delete item {} from remote calendar: {}", id_change, err)); + result.error(&format!("Unable to delete (update) item {} from remote calendar: {}", id_change, err)); } match cal_remote.add_item(item.clone()).await { - Err(err) => log::error!("Unable to add item {} to remote calendar: {}", id_change, err), + Err(err) => log::error!("Unable to add (update) item {} to remote calendar: {}", id_change, err), Ok(new_ss) => { // Update local sync status item.set_sync_status(new_ss);