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 <foxy@free.fr>
This commit is contained in:
Laurent Cheylus 2024-05-04 18:02:17 +02:00
parent 225a1052a7
commit 7a556a6e82
No known key found for this signature in database

View file

@ -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();
}