Skip to content

Commit

Permalink
style: Make clippy happy
Browse files Browse the repository at this point in the history
  • Loading branch information
epage committed May 19, 2023
1 parent ab38975 commit d345ce3
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 4 deletions.
3 changes: 2 additions & 1 deletion examples/example_fixture.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ fn run() -> Result<(), Box<dyn Error>> {
let code = env::var("exit")
.ok()
.map(|v| v.parse::<i32>())
.map_or(Ok(None), |r| r.map(Some))?
.map(|r| r.map(Some))
.unwrap_or(Ok(None))?
.unwrap_or(0);
process::exit(code);
}
Expand Down
3 changes: 2 additions & 1 deletion src/bin/bin_fixture.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ fn run() -> Result<(), Box<dyn Error>> {
let code = env::var("exit")
.ok()
.map(|v| v.parse::<i32>())
.map_or(Ok(None), |r| r.map(Some))?
.map(|r| r.map(Some))
.unwrap_or(Ok(None))?
.unwrap_or(0);
process::exit(code);
}
Expand Down
1 change: 1 addition & 0 deletions src/format/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ type CowStr<'a> = borrow::Cow<'a, str>;
/// A cargo message
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
#[serde(tag = "reason", rename_all = "kebab-case")]
#[allow(clippy::large_enum_variant)]
pub enum Message<'a> {
/// Build completed, all further output should not be parsed
BuildFinished(BuildFinished),
Expand Down
2 changes: 1 addition & 1 deletion tests/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ fn test_fixture(name: &str) {
let temp = assert_fs::TempDir::new().unwrap();

let msgs = escargot::CargoBuild::new()
.manifest_path(&format!("tests/fixtures/{}/Cargo.toml", name))
.manifest_path(format!("tests/fixtures/{}/Cargo.toml", name))
.current_release()
.current_target()
.target_dir(temp.path())
Expand Down
2 changes: 1 addition & 1 deletion tests/run.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ fn test_fixture(name: &str) {
let temp = assert_fs::TempDir::new().unwrap();

let cmd = escargot::CargoBuild::new()
.manifest_path(&format!("tests/fixtures/{}/Cargo.toml", name))
.manifest_path(format!("tests/fixtures/{}/Cargo.toml", name))
.current_release()
.current_target()
.target_dir(temp.path())
Expand Down

0 comments on commit d345ce3

Please sign in to comment.