Skip to content

Commit 6be6b98

Browse files
committed
Fix clippy warnings: collapse nested if, remove useless .into()
1 parent 5649434 commit 6be6b98

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

src/settings.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,10 @@ fn merge_env(base: &mut serde_json::Value) {
9595
if let Ok(v) = std::env::var("PLANE_CLI_WORKSPACE") {
9696
map.insert("workspace".to_string(), serde_json::Value::String(v));
9797
}
98-
if let Ok(v) = std::env::var("PLANE_CLI_TIMEOUT") {
99-
if let Ok(n) = v.parse::<u64>() {
100-
map.insert("timeout".to_string(), serde_json::json!(n));
101-
}
98+
if let Ok(v) = std::env::var("PLANE_CLI_TIMEOUT")
99+
&& let Ok(n) = v.parse::<u64>()
100+
{
101+
map.insert("timeout".to_string(), serde_json::json!(n));
102102
}
103103
}
104104

tests/cli.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use wiremock::matchers::{method, path};
44
use wiremock::{Mock, MockServer, ResponseTemplate};
55

66
fn plane_cmd() -> assert_cmd::Command {
7-
cargo_bin_cmd!("plane-cli").into()
7+
cargo_bin_cmd!("plane-cli")
88
}
99

1010
#[test]

0 commit comments

Comments
 (0)