diff --git a/sabry_intrnl/src/compiler/mod.rs b/sabry_intrnl/src/compiler/mod.rs index 7376497..882a8bf 100644 --- a/sabry_intrnl/src/compiler/mod.rs +++ b/sabry_intrnl/src/compiler/mod.rs @@ -109,19 +109,22 @@ impl Debug for SabryCompilerError { Self::LightPrint(e) => format!( "{} at {:?}", e.kind, - e.loc.clone() + e.loc + .clone() .map(|l| format!("file {}, line {}, col {}", l.filename, l.line, l.column)) ), Self::GrassCompile(err) => format!("{err}"), Self::LightMinify(e) => format!( "{} at {:?}", e.kind, - e.loc.clone() + e.loc + .clone() .map(|l| format!("file {}, line {}, col {}", l.filename, l.line, l.column)) ), Self::LightParse { kind, loc } => format!( "{kind} at {:?}", - loc.clone().map(|l| format!("file {}, line {}, col {}", l.filename, l.line, l.column)) + loc.clone() + .map(|l| format!("file {}, line {}, col {}", l.filename, l.line, l.column)) ), }; diff --git a/sabry_intrnl/src/scoper/mod.rs b/sabry_intrnl/src/scoper/mod.rs index a42949c..d89f7b0 100644 --- a/sabry_intrnl/src/scoper/mod.rs +++ b/sabry_intrnl/src/scoper/mod.rs @@ -18,7 +18,7 @@ pub enum ScopeError { impl Debug for ScopeError { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { let a = match self { - Self::Raffia(kind, source) => format!("{kind}: at {source}") + Self::Raffia(kind, source) => format!("{kind}: at {source}"), }; write!(f, "{a}") @@ -43,14 +43,11 @@ impl<'s> ArbitraryScope<'s> { Ok(a) => a, Err(e) => { let source = &source[e.span.start..e.span.end]; - return Err(ScopeError::Raffia(e.kind, source.to_string())) + return Err(ScopeError::Raffia(e.kind, source.to_string())); } }; - Ok(Self { - adapter, - name, - }) + Ok(Self { adapter, name }) } /// Consume arbitrary scope and create a [HashedScope] in its basis diff --git a/sabry_procmacro_impl/src/impls/sassy.rs b/sabry_procmacro_impl/src/impls/sassy.rs index b05d03f..e8149bc 100644 --- a/sabry_procmacro_impl/src/impls/sassy.rs +++ b/sabry_procmacro_impl/src/impls/sassy.rs @@ -23,10 +23,8 @@ pub fn sassy_macro_impl(input: TokenStream) -> TokenStream { // quick raffia syntax check match ArbitraryScope::from_source(mode.into(), ident.clone(), &code.code) { - Ok(_) => {}, - Err(e) => { - return syn::Error::new(code.span, format!("{e:?}")).into_compile_error() - } + Ok(_) => {} + Err(e) => return syn::Error::new(code.span, format!("{e:?}")).into_compile_error(), } let sourcesass = code.to_string();