1
0
mirror of https://github.com/sharkdp/bat synced 2026-08-11 20:11:43 +00:00

cargo fmt

This commit is contained in:
Keith Hall
2026-03-18 22:25:07 +02:00
parent 031ba0953a
commit c6e661d80b
2 changed files with 6 additions and 5 deletions
+5 -3
View File
@@ -165,9 +165,11 @@ impl<'de> serde::Deserialize<'de> for Matcher {
let raw = RawMatcher::deserialize(deserializer)?; let raw = RawMatcher::deserialize(deserializer)?;
match raw { match raw {
RawMatcher::Simple(s) => Matcher::from_str(&s).map_err(serde::de::Error::custom), RawMatcher::Simple(s) => Matcher::from_str(&s).map_err(serde::de::Error::custom),
RawMatcher::Full { glob, case_sensitive } => { RawMatcher::Full {
let mut matcher = glob,
Matcher::from_str(&glob).map_err(serde::de::Error::custom)?; case_sensitive,
} => {
let mut matcher = Matcher::from_str(&glob).map_err(serde::de::Error::custom)?;
matcher.case = if case_sensitive { matcher.case = if case_sensitive {
Case::Sensitive Case::Sensitive
} else { } else {
+1 -2
View File
@@ -54,8 +54,7 @@ include!(concat!(
/// ///
/// Used internally by `Lazy<Option<GlobMatcher>>`'s lazy evaluation closure. /// Used internally by `Lazy<Option<GlobMatcher>>`'s lazy evaluation closure.
fn build_matcher_fixed(from: &str, case: Case) -> GlobMatcher { fn build_matcher_fixed(from: &str, case: Case) -> GlobMatcher {
make_glob_matcher(from, case) make_glob_matcher(from, case).expect("A builtin fixed glob matcher failed to compile")
.expect("A builtin fixed glob matcher failed to compile")
} }
/// Join a list of matcher segments to create a glob string, replacing all /// Join a list of matcher segments to create a glob string, replacing all