From 225a1052a78d96bf561edeb20379535e71d2d691 Mon Sep 17 00:00:00 2001 From: Laurent Cheylus Date: Sat, 4 May 2024 18:00:20 +0200 Subject: [PATCH 1/3] df: disable clippy::assigning_clones on OpenBSD - Avoid error on OpenBSD stable/7.5 with clippy (lint) - assigning_clones added in Rust 1.78.0 (1.76 used on OpenBSD 7.5) https://rust-lang.github.io/rust-clippy/master/index.html#/assigning_clones Signed-off-by: Laurent Cheylus --- src/uu/df/src/filesystem.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/uu/df/src/filesystem.rs b/src/uu/df/src/filesystem.rs index 07d24b83f..821c99ab4 100644 --- a/src/uu/df/src/filesystem.rs +++ b/src/uu/df/src/filesystem.rs @@ -220,7 +220,9 @@ mod tests { } #[test] - #[allow(clippy::assigning_clones)] + // clippy::assigning_clones added with Rust 1.78 + // Rust version = 1.76 on OpenBSD stable/7.5 + #[cfg_attr(not(target_os = "openbsd"), allow(clippy::assigning_clones))] fn test_dev_name_match() { let tmp = tempfile::TempDir::new().expect("Failed to create temp dir"); let dev_name = std::fs::canonicalize(tmp.path()) From 7a556a6e82d38749a92b60a986f7430e82e79282 Mon Sep 17 00:00:00 2001 From: Laurent Cheylus Date: Sat, 4 May 2024 18:02:17 +0200 Subject: [PATCH 2/3] cp: disable clippy::assigning_clones on OpenBSD - Avoid error on OpenBSD stable/7.5 with clippy (lint) - assigning_clones added in Rust 1.78.0 (1.76 used on OpenBSD 7.5) https://rust-lang.github.io/rust-clippy/master/index.html#/assigning_clones Signed-off-by: Laurent Cheylus --- src/uu/cp/src/cp.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/uu/cp/src/cp.rs b/src/uu/cp/src/cp.rs index c9d2783a4..5d91591c9 100644 --- a/src/uu/cp/src/cp.rs +++ b/src/uu/cp/src/cp.rs @@ -1120,7 +1120,9 @@ fn parse_path_args( }; if options.strip_trailing_slashes { - #[allow(clippy::assigning_clones)] + // clippy::assigning_clones added with Rust 1.78 + // Rust version = 1.76 on OpenBSD stable/7.5 + #[cfg_attr(not(target_os = "openbsd"), allow(clippy::assigning_clones))] for source in &mut paths { *source = source.components().as_path().to_owned(); } From 14258b12ad15442dafca91301e4f2e68a7884aee Mon Sep 17 00:00:00 2001 From: Laurent Cheylus Date: Sat, 4 May 2024 18:03:39 +0200 Subject: [PATCH 3/3] tail: disable clippy::assigning_clones on OpenBSD - Avoid error on OpenBSD stable/7.5 with clippy (lint) - assigning_clones added in Rust 1.78.0 (1.76 used on OpenBSD 7.5) https://rust-lang.github.io/rust-clippy/master/index.html#/assigning_clones Signed-off-by: Laurent Cheylus --- src/uu/tail/src/follow/watch.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/uu/tail/src/follow/watch.rs b/src/uu/tail/src/follow/watch.rs index 2e0fc651c..b74e5c108 100644 --- a/src/uu/tail/src/follow/watch.rs +++ b/src/uu/tail/src/follow/watch.rs @@ -45,7 +45,9 @@ impl WatcherRx { Tested for notify::InotifyWatcher and for notify::PollWatcher. */ if let Some(parent) = path.parent() { - #[allow(clippy::assigning_clones)] + // clippy::assigning_clones added with Rust 1.78 + // Rust version = 1.76 on OpenBSD stable/7.5 + #[cfg_attr(not(target_os = "openbsd"), allow(clippy::assigning_clones))] if parent.is_dir() { path = parent.to_owned(); } else {