From 563c4c290d2ab85e3894c9ef7f481e1187a016b0 Mon Sep 17 00:00:00 2001 From: cyqsimon <28627918+cyqsimon@users.noreply.github.com> Date: Tue, 8 Jul 2025 18:42:59 +0800 Subject: [PATCH] Consistent spaces in `quote!` invocations --- build/syntax_mapping.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/build/syntax_mapping.rs b/build/syntax_mapping.rs index 81fb6318..1636443a 100644 --- a/build/syntax_mapping.rs +++ b/build/syntax_mapping.rs @@ -124,10 +124,10 @@ impl ToTokens for Matcher { let t = match self.0.as_slice() { [] => unreachable!("0-length matcher should never be created"), [MatcherSegment::Text(text)] => { - quote! { Lazy::new(|| Some(build_matcher_fixed(#text)))} + quote! { Lazy::new(|| Some(build_matcher_fixed(#text))) } } // parser logic ensures that this case can only happen when there are dynamic segments - segs @ [_, ..] => quote! { Lazy::new(|| build_matcher_dynamic(&[ #(#segs),* ]))}, + segs @ [_, ..] => quote! { Lazy::new(|| build_matcher_dynamic(&[ #(#segs),* ])) }, }; tokens.append_all(t); } @@ -144,8 +144,8 @@ enum MatcherSegment { impl ToTokens for MatcherSegment { fn to_tokens(&self, tokens: &mut TokenStream) { let t = match self { - Self::Text(text) => quote! { MatcherSegment::Text(#text)}, - Self::Env(env) => quote! {MatcherSegment::Env(#env)}, + Self::Text(text) => quote! { MatcherSegment::Text(#text) }, + Self::Env(env) => quote! { MatcherSegment::Env(#env) }, }; tokens.append_all(t); }