Skip to content

Commit

Permalink
clippy errors
Browse files Browse the repository at this point in the history
  • Loading branch information
nicoburniske committed Apr 1, 2024
1 parent 4ae5ede commit 12a48b9
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions golem-template-service-base/src/service/template_processor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use golem_wasm_ast::{

pub fn process_template(data: &[u8]) -> Result<TemplateMetadata, TemplateProcessingError> {
let component = Component::<IgnoreAllButMetadata>::from_bytes(data)
.map_err(|e| TemplateProcessingError::Parsing(e))?;
.map_err(TemplateProcessingError::Parsing)?;

let producers = component
.get_all_producers()
Expand Down Expand Up @@ -44,9 +44,7 @@ impl Display for TemplateProcessingError {
match self {
TemplateProcessingError::Parsing(e) => write!(f, "Parsing error: {}", e),
TemplateProcessingError::Analysis(source) => {
let error = match source {
AnalysisFailure::Failed(error) => error,
};
let AnalysisFailure::Failed(error) = source;
write!(f, "Analysis error: {}", error)
}
}
Expand Down

0 comments on commit 12a48b9

Please sign in to comment.