diff --git a/autorust/codegen/src/codegen.rs b/autorust/codegen/src/codegen.rs index bf8b7319..ee13b0a7 100644 --- a/autorust/codegen/src/codegen.rs +++ b/autorust/codegen/src/codegen.rs @@ -101,7 +101,7 @@ impl<'a> CodeGen<'a> { || self .spec .operations() - .map_or(false, |f| f.iter().any(|op| op.has_xml())) + .is_ok_and(|f| f.iter().any(|op| op.has_xml())) } } diff --git a/autorust/codegen/src/gen.rs b/autorust/codegen/src/gen.rs index 715912f9..d9cf4a24 100644 --- a/autorust/codegen/src/gen.rs +++ b/autorust/codegen/src/gen.rs @@ -1,7 +1,7 @@ use crate::{ autorust_toml, cargo_toml, io, lib_rs, readme_md::{self, ReadmeMd}, - run, CrateConfig, Error, ErrorKind, Result, ResultExt, RunConfig, SpecReadme, + run, CrateConfig, ErrorKind, Result, ResultExt, RunConfig, SpecReadme, }; use std::{collections::HashMap, fs}; @@ -65,7 +65,7 @@ pub fn gen_crate( let input_files: Result> = tag .input_files() .iter() - .map(|input_file| io::join(spec.readme(), input_file).map_err(Error::from)) + .map(|input_file| io::join(spec.readme(), input_file)) .collect(); let input_files = input_files.with_context(ErrorKind::CodeGen, || { format!("collecting input files for tag {name}") diff --git a/autorust/openapi/src/status_code.rs b/autorust/openapi/src/status_code.rs index ca45c8cc..88a24ea4 100644 --- a/autorust/openapi/src/status_code.rs +++ b/autorust/openapi/src/status_code.rs @@ -74,7 +74,7 @@ impl<'de> Deserialize<'de> for StatusCode { if let Ok(number) = value.parse::() { self.visit_i64(number) } else { - return Err(E::invalid_value(Unexpected::Str(value), &"not i64")); + Err(E::invalid_value(Unexpected::Str(value), &"not i64")) } } }