diff --git a/src/uu/df/src/df.rs b/src/uu/df/src/df.rs index b3692f481..c501b0bab 100644 --- a/src/uu/df/src/df.rs +++ b/src/uu/df/src/df.rs @@ -240,7 +240,7 @@ impl Options { } } - (!intersected_types.is_empty()).then(|| intersected_types) + (!intersected_types.is_empty()).then_some(intersected_types) } } diff --git a/src/uucore/src/lib/features/memo.rs b/src/uucore/src/lib/features/memo.rs index 517efc9e2..47d04f5b8 100644 --- a/src/uucore/src/lib/features/memo.rs +++ b/src/uucore/src/lib/features/memo.rs @@ -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() - ) + ); } } diff --git a/src/uucore/src/lib/mods/error.rs b/src/uucore/src/lib/mods/error.rs index 8f1b2f3ec..5d4527d74 100644 --- a/src/uucore/src/lib/mods/error.rs +++ b/src/uucore/src/lib/mods/error.rs @@ -771,6 +771,6 @@ mod tests { .map_err_context(|| String::from("test")) .unwrap_err() .to_string() - ) + ); } }