Skip to content

Commit 1ab6e6c

Browse files
committed
fix clippy warnings
1 parent cd6147c commit 1ab6e6c

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

src/uu/cp/src/cp.rs

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1004,19 +1004,19 @@ impl Options {
10041004
fn get_attributes(matches: &ArgMatches) -> CopyResult<Attributes> {
10051005
if let Some(attribute_strs) = matches.get_many::<String>(options::PRESERVE) {
10061006
if attribute_strs.len() == 0 {
1007-
return Ok(Attributes::DEFAULT);
1007+
Ok(Attributes::DEFAULT)
10081008
} else {
1009-
return Attributes::parse_iter(attribute_strs);
1009+
Attributes::parse_iter(attribute_strs)
10101010
}
10111011
} else if matches.get_flag(options::ARCHIVE) {
10121012
// --archive is used. Same as --preserve=all
1013-
return Ok(Attributes::ALL);
1013+
Ok(Attributes::ALL)
10141014
} else if matches.get_flag(options::NO_DEREFERENCE_PRESERVE_LINKS) {
1015-
return Ok(Attributes::LINKS);
1015+
Ok(Attributes::LINKS)
10161016
} else if matches.get_flag(options::PRESERVE_DEFAULT_ATTRIBUTES) {
1017-
return Ok(Attributes::DEFAULT);
1017+
Ok(Attributes::DEFAULT)
10181018
} else {
1019-
return Ok(Attributes::NONE);
1019+
Ok(Attributes::NONE)
10201020
}
10211021
}
10221022

@@ -1715,6 +1715,7 @@ fn get_dest_permissions(dest: &Path, source_metadata: &fs::Metadata) -> fs::Perm
17151715

17161716
// This function handles the copying process based on the specified copy mode.
17171717
// It can handle different modes like linking, copying, symbolic linking, updating, and attribute-only copying.
1718+
#[allow(clippy::too_many_arguments)]
17181719
fn handle_copy_mode(
17191720
options: &Options,
17201721
source: &Path,
@@ -1804,6 +1805,7 @@ fn handle_link_mode(
18041805

18051806
// This function handles the update mode, which updates the destination based on the source.
18061807
// It can replace all, none, or only older files based on the provided options.
1808+
#[allow(clippy::too_many_arguments)]
18071809
fn handle_update_mode(
18081810
options: &Options,
18091811
source: &Path,

0 commit comments

Comments
 (0)