From da80d04bdb26a8a8cbeefd9402049a02223b20c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20M=C3=BCller?= Date: Thu, 29 Aug 2024 07:55:08 -0700 Subject: [PATCH] Adhere to Clippy provided suggestions Implement a couple of suggestions made by Clippy. --- Cargo.toml | 2 +- src/db.rs | 4 ++-- src/ser/backends/ical/task.rs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 44bd67d06..7988f7f3c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -80,7 +80,7 @@ version = "0.6.1" features = ["derive"] [dependencies.icalendar] -version = "0.16" +version = "0.16.5" default-features = false features = ["parser"] diff --git a/src/db.rs b/src/db.rs index 7a84048bb..140c632d5 100644 --- a/src/db.rs +++ b/src/db.rs @@ -837,7 +837,7 @@ pub mod tests { let () = db.data.reserve(ITEM_CNT); for item in items.iter() { - assert!(db.try_push(black_box(item.clone())).is_some()); + assert!(db.try_push(black_box(Rc::clone(&item))).is_some()); } }); } @@ -849,7 +849,7 @@ pub mod tests { let mut db = Db::from_iter([]); let items = (1..ITEM_CNT) - .map(|i| db.push(i).deref().clone()) + .map(|i| Rc::clone(db.push(i).deref())) .collect::>(); let () = b.iter(|| { diff --git a/src/ser/backends/ical/task.rs b/src/ser/backends/ical/task.rs index 4d07194d7..379644653 100644 --- a/src/ser/backends/ical/task.rs +++ b/src/ser/backends/ical/task.rs @@ -43,7 +43,7 @@ impl From<&Task> for Todo { todo.add_property(TAGS_PROPERTY, &tags); } if let Some(position) = &task.position { - todo.add_property(POSITION_PROPERTY, &position.to_string()); + todo.add_property(POSITION_PROPERTY, position.to_string()); } todo