Skip to content

Commit 8282bb9

Browse files
committed
clippy: fix warnings from cloned_ref_to_slice_refs
1 parent c7c3074 commit 8282bb9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/uu/df/src/df.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -688,7 +688,7 @@ mod tests {
688688
fn test_different_dev_id() {
689689
let m1 = mount_info("0", "/mnt/bar");
690690
let m2 = mount_info("1", "/mnt/bar");
691-
assert!(is_best(&[m1.clone()], &m2));
691+
assert!(is_best(std::slice::from_ref(&m1), &m2));
692692
assert!(is_best(&[m2], &m1));
693693
}
694694

@@ -699,7 +699,7 @@ mod tests {
699699
// one condition in this test.
700700
let m1 = mount_info("0", "/mnt/bar");
701701
let m2 = mount_info("0", "/mnt/bar/baz");
702-
assert!(!is_best(&[m1.clone()], &m2));
702+
assert!(!is_best(std::slice::from_ref(&m1), &m2));
703703
assert!(is_best(&[m2], &m1));
704704
}
705705
}

0 commit comments

Comments
 (0)