chore: make Clippy happy
This commit is contained in:
parent
868ae1ffef
commit
14165f0137
3 changed files with 3 additions and 6 deletions
2
build.rs
2
build.rs
|
@ -19,7 +19,7 @@ fn main() {
|
||||||
let mock_dst = out_dir.join("mock.rs");
|
let mock_dst = out_dir.join("mock.rs");
|
||||||
fs::write(&mock_dst, mock).unwrap();
|
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={}", client_dst.display());
|
||||||
println!("cargo:rerun-if-changed={}", mock_dst.display());
|
println!("cargo:rerun-if-changed={}", mock_dst.display());
|
||||||
}
|
}
|
||||||
|
|
|
@ -48,7 +48,7 @@ where
|
||||||
T: Display,
|
T: Display,
|
||||||
{
|
{
|
||||||
match o {
|
match o {
|
||||||
Some(s) => format!("{}", s),
|
Some(s) => format!("{s}"),
|
||||||
None => String::new(),
|
None => String::new(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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() {
|
Some(c) => match card.bday.as_ref().unwrap() {
|
||||||
DateTimeOrTextProperty::DateTime(dt) => {
|
DateTimeOrTextProperty::DateTime(dt) => {
|
||||||
let bday = vcard_date_to_naive_date(dt.value.first().unwrap().clone())?;
|
let bday = vcard_date_to_naive_date(dt.value.first().unwrap().clone())?;
|
||||||
if c.date_of_birth
|
if c.date_of_birth.as_ref().is_some_and(|bdate| bday == *bdate) {
|
||||||
.as_ref()
|
|
||||||
.map_or(false, |bdate| bday == *bdate)
|
|
||||||
{
|
|
||||||
debug!(
|
debug!(
|
||||||
"{} already has the proper date of birth, skipping",
|
"{} already has the proper date of birth, skipping",
|
||||||
formatted_name
|
formatted_name
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue