diff options
| author | Henry Gressmann <mail@henrygressmann.de> | 2024-08-12 16:12:07 +0200 |
|---|---|---|
| committer | Henry Gressmann <mail@henrygressmann.de> | 2024-08-12 16:12:07 +0200 |
| commit | 06f81026eca6446d737e3759951ca15001a819c5 (patch) | |
| tree | e06d747eb225cac6e24557faa2694895d52741ae /crates/parser/src/error.rs | |
| parent | d33a0c66a17316755e572b3620fb030ec1e52f61 (diff) | |
chore: clean up code
Signed-off-by: Henry Gressmann <mail@henrygressmann.de>
Diffstat (limited to 'crates/parser/src/error.rs')
| -rw-r--r-- | crates/parser/src/error.rs | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/crates/parser/src/error.rs b/crates/parser/src/error.rs index c32e026..7bd484f 100644 --- a/crates/parser/src/error.rs +++ b/crates/parser/src/error.rs @@ -42,19 +42,19 @@ impl Display for ParseError { fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { match self { Self::InvalidType => write!(f, "invalid type"), - Self::UnsupportedSection(section) => write!(f, "unsupported section: {}", section), - Self::DuplicateSection(section) => write!(f, "duplicate section: {}", section), - Self::EmptySection(section) => write!(f, "empty section: {}", section), - Self::UnsupportedOperator(operator) => write!(f, "unsupported operator: {}", operator), + Self::UnsupportedSection(section) => write!(f, "unsupported section: {section}"), + Self::DuplicateSection(section) => write!(f, "duplicate section: {section}"), + Self::EmptySection(section) => write!(f, "empty section: {section}"), + Self::UnsupportedOperator(operator) => write!(f, "unsupported operator: {operator}"), Self::ParseError { message, offset } => { - write!(f, "error parsing module: {} at offset {}", message, offset) + write!(f, "error parsing module: {message} at offset {offset}") } - Self::InvalidEncoding(encoding) => write!(f, "invalid encoding: {:?}", encoding), + Self::InvalidEncoding(encoding) => write!(f, "invalid encoding: {encoding:?}"), Self::InvalidLocalCount { expected, actual } => { - write!(f, "invalid local count: expected {}, actual {}", expected, actual) + write!(f, "invalid local count: expected {expected}, actual {actual}") } Self::EndNotReached => write!(f, "end of module not reached"), - Self::Other(message) => write!(f, "unknown error: {}", message), + Self::Other(message) => write!(f, "unknown error: {message}"), } } } |
