From 7a6f442c8666bcda1649786ee48256f09b21363e Mon Sep 17 00:00:00 2001 From: Keith Hall Date: Fri, 20 Mar 2026 23:35:27 +0200 Subject: [PATCH] improvements from PR review - prefer to use `Default::default` because it's semantically clearer why we've chosen to use a particular value --- build/syntax_mapping.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/build/syntax_mapping.rs b/build/syntax_mapping.rs index 11d778e3..bc4601fc 100644 --- a/build/syntax_mapping.rs +++ b/build/syntax_mapping.rs @@ -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>`.