diff --git a/build.rs b/build.rs index 5436eb9..34f3c27 100644 --- a/build.rs +++ b/build.rs @@ -19,7 +19,7 @@ fn main() { let mock_dst = out_dir.join("mock.rs"); fs::write(&mock_dst, mock).unwrap(); - println!("cargo:rerun-if-changed={}", src); + println!("cargo:rerun-if-changed={src}"); println!("cargo:rerun-if-changed={}", client_dst.display()); println!("cargo:rerun-if-changed={}", mock_dst.display()); } diff --git a/src/commands/list_libraries.rs b/src/commands/list_libraries.rs index 73957d8..6565f0a 100644 --- a/src/commands/list_libraries.rs +++ b/src/commands/list_libraries.rs @@ -48,7 +48,7 @@ where T: Display, { match o { - Some(s) => format!("{}", s), + Some(s) => format!("{s}"), None => String::new(), } } diff --git a/src/commands/sync_date_of_birth.rs b/src/commands/sync_date_of_birth.rs index 515c043..0aaf40d 100644 --- a/src/commands/sync_date_of_birth.rs +++ b/src/commands/sync_date_of_birth.rs @@ -53,10 +53,7 @@ pub async fn sync_date_of_birth(ctx: Context, vcard_file: &PathBuf) -> Result<() Some(c) => match card.bday.as_ref().unwrap() { DateTimeOrTextProperty::DateTime(dt) => { let bday = vcard_date_to_naive_date(dt.value.first().unwrap().clone())?; - if c.date_of_birth - .as_ref() - .map_or(false, |bdate| bday == *bdate) - { + if c.date_of_birth.as_ref().is_some_and(|bdate| bday == *bdate) { debug!( "{} already has the proper date of birth, skipping", formatted_name