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

View file

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