1
0
mirror of https://github.com/sharkdp/bat synced 2026-07-20 16:33:20 +00:00

improvements from PR review

- prefer to use `Default::default` because it's semantically clearer why we've chosen to use a particular value
This commit is contained in:
Keith Hall
2026-03-20 23:35:27 +02:00
parent 3767f15c2a
commit 7a6f442c86
+3 -2
View File
@@ -50,9 +50,10 @@ impl ToTokens for MappingTarget {
/// Whether a glob pattern should be matched case-sensitively or case-insensitively.
///
/// Mirrors the runtime `Case` type in `src/syntax_mapping.rs`.
#[derive(Clone, Debug, PartialEq, Eq, Hash)]
#[derive(Clone, Debug, PartialEq, Eq, Hash, Default)]
enum Case {
Sensitive,
#[default]
Insensitive,
}
impl ToTokens for Case {
@@ -65,7 +66,7 @@ impl ToTokens for Case {
}
}
#[derive(Clone, Debug, PartialEq, Eq, Hash)]
#[derive(Clone, Debug, Default, PartialEq, Eq, Hash)]
/// A single matcher.
///
/// Codegen converts this into a `Lazy<Option<GlobMatcher>>`.