fmt: always forget about fmt
This commit is contained in:
parent
6568819310
commit
7c996a3f47
2 changed files with 11 additions and 13 deletions
|
|
@ -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))
|
||||
),
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue