Merge pull request #4219 from cakebaker/match_wildcard_for_single_variant

chore: fix wildcards that match single variant
This commit is contained in:
Terts Diepraam 2022-12-13 11:57:52 +01:00 committed by GitHub
commit 69caa45b01
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 7 additions and 7 deletions

View file

@ -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)

View file

@ -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 => {}
}
}

View file

@ -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];

View file

@ -396,7 +396,7 @@ pub fn canonicalize<P: AsRef<Path>>(
read_dir(parent)?;
}
}
_ => {}
MissingHandling::Missing => {}
}
Ok(result)
}

View file

@ -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 {