mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-29 12:07:46 +00:00
Merge pull request #6592 from cakebaker/clippy_fix_warnings
clippy: fix warnings introduced by Rust 1.80
This commit is contained in:
commit
eaba6bf977
6 changed files with 15 additions and 17 deletions
|
@ -1947,7 +1947,8 @@ fn handle_copy_mode(
|
||||||
///
|
///
|
||||||
/// * `Ok(Permissions)` - The calculated permissions for the destination file.
|
/// * `Ok(Permissions)` - The calculated permissions for the destination file.
|
||||||
/// * `Err(CopyError)` - An error occurred while getting the metadata of the destination file.
|
/// * `Err(CopyError)` - An error occurred while getting the metadata of the destination file.
|
||||||
/// Allow unused variables for Windows (on options)
|
///
|
||||||
|
// Allow unused variables for Windows (on options)
|
||||||
#[allow(unused_variables)]
|
#[allow(unused_variables)]
|
||||||
fn calculate_dest_permissions(
|
fn calculate_dest_permissions(
|
||||||
dest: &Path,
|
dest: &Path,
|
||||||
|
|
|
@ -266,10 +266,10 @@ fn resolve_path(
|
||||||
/// Conditionally converts an absolute path to a relative form,
|
/// Conditionally converts an absolute path to a relative form,
|
||||||
/// according to the rules:
|
/// according to the rules:
|
||||||
/// 1. if only `relative_to` is given, the result is relative to `relative_to`
|
/// 1. if only `relative_to` is given, the result is relative to `relative_to`
|
||||||
/// 1. if only `relative_base` is given, it checks whether given `path` is a descendant
|
/// 2. if only `relative_base` is given, it checks whether given `path` is a descendant
|
||||||
/// of `relative_base`, on success the result is relative to `relative_base`, otherwise
|
/// of `relative_base`, on success the result is relative to `relative_base`, otherwise
|
||||||
/// the result is the given `path`
|
/// the result is the given `path`
|
||||||
/// 1. if both `relative_to` and `relative_base` are given, the result is relative to `relative_to`
|
/// 3. if both `relative_to` and `relative_base` are given, the result is relative to `relative_to`
|
||||||
/// if `path` is a descendant of `relative_base`, otherwise the result is `path`
|
/// if `path` is a descendant of `relative_base`, otherwise the result is `path`
|
||||||
///
|
///
|
||||||
/// For more information see
|
/// For more information see
|
||||||
|
|
|
@ -191,15 +191,12 @@ pub fn strip_minus_from_mode(args: &mut Vec<String>) -> bool {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if let Some(arg_stripped) = arg.strip_prefix('-') {
|
if let Some(arg_stripped) = arg.strip_prefix('-') {
|
||||||
if let Some(second) = arg.chars().nth(1) {
|
if let Some('r' | 'w' | 'x' | 'X' | 's' | 't' | 'u' | 'g' | 'o' | '0'..='7') =
|
||||||
match second {
|
arg.chars().nth(1)
|
||||||
'r' | 'w' | 'x' | 'X' | 's' | 't' | 'u' | 'g' | 'o' | '0'..='7' => {
|
{
|
||||||
*arg = arg_stripped.to_string();
|
*arg = arg_stripped.to_string();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
_ => {}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
false
|
false
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue