Skip to content

Commit bf3186c

Browse files
authored
Clippy fix (#770)
* Clippy fix * Fix clippy warnings * Fix clippy warning
1 parent aff71e2 commit bf3186c

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

autorust/codegen/src/codegen.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ impl<'a> CodeGen<'a> {
101101
|| self
102102
.spec
103103
.operations()
104-
.map_or(false, |f| f.iter().any(|op| op.has_xml()))
104+
.is_ok_and(|f| f.iter().any(|op| op.has_xml()))
105105
}
106106
}
107107

autorust/codegen/src/gen.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use crate::{
22
autorust_toml, cargo_toml, io, lib_rs,
33
readme_md::{self, ReadmeMd},
4-
run, CrateConfig, Error, ErrorKind, Result, ResultExt, RunConfig, SpecReadme,
4+
run, CrateConfig, ErrorKind, Result, ResultExt, RunConfig, SpecReadme,
55
};
66
use std::{collections::HashMap, fs};
77

@@ -65,7 +65,7 @@ pub fn gen_crate(
6565
let input_files: Result<Vec<_>> = tag
6666
.input_files()
6767
.iter()
68-
.map(|input_file| io::join(spec.readme(), input_file).map_err(Error::from))
68+
.map(|input_file| io::join(spec.readme(), input_file))
6969
.collect();
7070
let input_files = input_files.with_context(ErrorKind::CodeGen, || {
7171
format!("collecting input files for tag {name}")

autorust/openapi/src/status_code.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ impl<'de> Deserialize<'de> for StatusCode {
7474
if let Ok(number) = value.parse::<i64>() {
7575
self.visit_i64(number)
7676
} else {
77-
return Err(E::invalid_value(Unexpected::Str(value), &"not i64"));
77+
Err(E::invalid_value(Unexpected::Str(value), &"not i64"))
7878
}
7979
}
8080
}

0 commit comments

Comments
 (0)