Clippy fixes for MSRV 1.64

This commit is contained in:
Terts Diepraam 2023-02-11 12:51:01 +01:00
parent b10950e383
commit d60fc40f2f
3 changed files with 5 additions and 5 deletions

View file

@ -240,7 +240,7 @@ impl Options {
}
}
(!intersected_types.is_empty()).then(|| intersected_types)
(!intersected_types.is_empty()).then_some(intersected_types)
}
}

View file

@ -154,7 +154,7 @@ mod tests {
#[test]
fn test_sprintf_smoke() {
assert_eq!(sprintf("", &[]).unwrap(), "".to_string())
assert_eq!(sprintf("", &[]).unwrap(), "".to_string());
}
#[test]
@ -162,7 +162,7 @@ mod tests {
assert_eq!(
sprintf("hello world", &[]).unwrap(),
"hello world".to_string()
)
);
}
#[test]
@ -170,6 +170,6 @@ mod tests {
assert_eq!(
sprintf("hello %s", &["world".to_string()]).unwrap(),
"hello world".to_string()
)
);
}
}

View file

@ -771,6 +771,6 @@ mod tests {
.map_err_context(|| String::from("test"))
.unwrap_err()
.to_string()
)
);
}
}