mirror of
https://github.com/uutils/coreutils
synced 2024-12-13 23:02:38 +00:00
Merge pull request #4219 from cakebaker/match_wildcard_for_single_variant
chore: fix wildcards that match single variant
This commit is contained in:
commit
69caa45b01
5 changed files with 7 additions and 7 deletions
|
@ -287,7 +287,7 @@ where
|
|||
OutputFmt::Shell => result.push_str("LS_COLORS='"),
|
||||
OutputFmt::CShell => result.push_str("setenv LS_COLORS '"),
|
||||
OutputFmt::Display => (),
|
||||
_ => unreachable!(),
|
||||
OutputFmt::Unknown => unreachable!(),
|
||||
}
|
||||
|
||||
let mut table: HashMap<&str, &str> = HashMap::with_capacity(48);
|
||||
|
@ -405,7 +405,7 @@ where
|
|||
// remove latest "\n"
|
||||
result.pop();
|
||||
}
|
||||
_ => unreachable!(),
|
||||
OutputFmt::Unknown => unreachable!(),
|
||||
}
|
||||
|
||||
Ok(result)
|
||||
|
|
|
@ -634,7 +634,7 @@ where
|
|||
match bad_format.cmp(&1) {
|
||||
Ordering::Equal => show_warning!("{} line is improperly formatted", bad_format),
|
||||
Ordering::Greater => show_warning!("{} lines are improperly formatted", bad_format),
|
||||
_ => {}
|
||||
Ordering::Less => {}
|
||||
};
|
||||
if failed_cksum > 0 {
|
||||
show_warning!("{} computed checksum did NOT match", failed_cksum);
|
||||
|
@ -644,7 +644,7 @@ where
|
|||
Ordering::Greater => {
|
||||
show_warning!("{} listed files could not be read", failed_open_file);
|
||||
}
|
||||
_ => {}
|
||||
Ordering::Less => {}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -126,7 +126,7 @@ impl<'a> BytesGenerator<'a> {
|
|||
fn new(total_bytes: u64, gen_type: PassType<'a>, exact: bool) -> BytesGenerator {
|
||||
let rng = match gen_type {
|
||||
PassType::Random => Some(RefCell::new(rand::thread_rng())),
|
||||
_ => None,
|
||||
PassType::Pattern(_) => None,
|
||||
};
|
||||
|
||||
let bytes = [0; BLOCK_SIZE];
|
||||
|
|
|
@ -396,7 +396,7 @@ pub fn canonicalize<P: AsRef<Path>>(
|
|||
read_dir(parent)?;
|
||||
}
|
||||
}
|
||||
_ => {}
|
||||
MissingHandling::Missing => {}
|
||||
}
|
||||
Ok(result)
|
||||
}
|
||||
|
|
|
@ -278,7 +278,7 @@ pub fn escape_name(name: &OsStr, style: &QuotingStyle) -> String {
|
|||
match quotes {
|
||||
Quotes::Single => format!("'{}'", escaped_str),
|
||||
Quotes::Double => format!("\"{}\"", escaped_str),
|
||||
_ => escaped_str,
|
||||
Quotes::None => escaped_str,
|
||||
}
|
||||
}
|
||||
QuotingStyle::Shell {
|
||||
|
|
Loading…
Reference in a new issue