diff options
author | Daniel Hofstetter <daniel.hofstetter@42dh.com> | 2024-05-05 13:06:33 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-05 13:06:33 +0200 |
commit | c2d55b4f843c041a819887e1ba65bd0941b5e12f (patch) | |
tree | 073f7998f42fd49d7f7124755422f7067f84b63d | |
parent | 945d20a9db133d00998555a8f16cb866e08a6026 (diff) | |
parent | 14258b12ad15442dafca91301e4f2e68a7884aee (diff) |
Merge pull request #6356 from lcheylus/clippy-openbsd
Disable clippy::assigning_clones on OpenBSD
-rw-r--r-- | src/uu/cp/src/cp.rs | 4 | ||||
-rw-r--r-- | src/uu/df/src/filesystem.rs | 4 | ||||
-rw-r--r-- | src/uu/tail/src/follow/watch.rs | 4 |
3 files changed, 9 insertions, 3 deletions
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(); } 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()) 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 { |