From 6fbc6276ef6b37acf728743fbcd9a502e0d3c90d Mon Sep 17 00:00:00 2001 From: John Batty Date: Sun, 12 Apr 2026 10:37:30 +0100 Subject: [PATCH 1/3] Clippy fix --- autorust/openapi/src/status_code.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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")) } } } From a7eb0287fbb3857f2093731032ceec92b3546b52 Mon Sep 17 00:00:00 2001 From: John Batty Date: Sun, 12 Apr 2026 10:46:23 +0100 Subject: [PATCH 2/3] Fix clippy warnings --- autorust/codegen/src/codegen.rs | 2 +- autorust/codegen/src/gen.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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..e66a4708 100644 --- a/autorust/codegen/src/gen.rs +++ b/autorust/codegen/src/gen.rs @@ -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}") From 9333d3314be45bc3ac93ec61e7ec5a7ab957a1df Mon Sep 17 00:00:00 2001 From: John Batty Date: Sun, 12 Apr 2026 10:57:26 +0100 Subject: [PATCH 3/3] Fix clippy warning --- autorust/codegen/src/gen.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autorust/codegen/src/gen.rs b/autorust/codegen/src/gen.rs index e66a4708..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};