boulder: Change recipe template to © AerynOS #2165
Annotations
3 warnings
Run clippy:
boulder/src/draft/upstream.rs#L102
[clippy] reported by reviewdog 🐶
warning: all if blocks contain the same code at the end
--> boulder/src/draft/upstream.rs:102:5
|
102 | / let result = Command::new("bsdtar")
103 | | .arg("xf")
104 | | .arg(archive)
105 | | .arg("-C")
... |
115 | | }
| |_____^
|
= note: the end suggestion probably needs some adjustments to use the expression result correctly
= warning: some moved values might need to be renamed to avoid wrong references
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#branches_sharing_code
= note: requested on the command line with `-W clippy::branches-sharing-code`
help: consider moving these statements after the if
|
102 ~ }
103 + let result = Command::new("bsdtar")
104 + .arg("xf")
105 + .arg(archive)
106 + .arg("-C")
107 + .arg(destination)
108 + .output()
109 + .await?;
110 + if result.status.success() {
111 + Ok(())
112 + } else {
113 + eprintln!("Command exited with: {}", String::from_utf8_lossy(&result.stderr));
114 + Err(Error::Extract(result.status))
115 + }
|
Raw Output:
boulder/src/draft/upstream.rs:102:5:w:warning: all if blocks contain the same code at the end
--> boulder/src/draft/upstream.rs:102:5
|
102 | / let result = Command::new("bsdtar")
103 | | .arg("xf")
104 | | .arg(archive)
105 | | .arg("-C")
... |
115 | | }
| |_____^
|
= note: the end suggestion probably needs some adjustments to use the expression result correctly
= warning: some moved values might need to be renamed to avoid wrong references
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#branches_sharing_code
= note: requested on the command line with `-W clippy::branches-sharing-code`
help: consider moving these statements after the if
|
102 ~ }
103 + let result = Command::new("bsdtar")
104 + .arg("xf")
105 + .arg(archive)
106 + .arg("-C")
107 + .arg(destination)
108 + .output()
109 + .await?;
110 + if result.status.success() {
111 + Ok(())
112 + } else {
113 + eprintln!("Command exited with: {}", String::from_utf8_lossy(&result.stderr));
114 + Err(Error::Extract(result.status))
115 + }
|
__END__
|
Run clippy:
boulder/src/build.rs#L334
[clippy] reported by reviewdog 🐶
warning: this method chain can be written more clearly with `if .. else ..`
--> boulder/src/build.rs:334:19
|
334 | let pgo = is_pgo.then_some("│").unwrap_or_default().dim();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `if is_pgo { "│" } else { Default::default() }`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#obfuscated_if_else
= note: `#[warn(clippy::obfuscated_if_else)]` on by default
Raw Output:
boulder/src/build.rs:334:19:w:warning: this method chain can be written more clearly with `if .. else ..`
--> boulder/src/build.rs:334:19
|
334 | let pgo = is_pgo.then_some("│").unwrap_or_default().dim();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `if is_pgo { "│" } else { Default::default() }`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#obfuscated_if_else
= note: `#[warn(clippy::obfuscated_if_else)]` on by default
__END__
|
Run clippy:
crates/stone/src/write.rs#L307
[clippy] reported by reviewdog 🐶
warning: this method chain can be written more clearly with `if .. else ..`
--> crates/stone/src/write.rs:307:47
|
307 | num_payloads: payloads.len() as u16 + content.is_some().then_some(1).unwrap_or_default(),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `if content.is_some() { 1 } else { Default::default() }`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#obfuscated_if_else
= note: `#[warn(clippy::obfuscated_if_else)]` on by default
Raw Output:
crates/stone/src/write.rs:307:47:w:warning: this method chain can be written more clearly with `if .. else ..`
--> crates/stone/src/write.rs:307:47
|
307 | num_payloads: payloads.len() as u16 + content.is_some().then_some(1).unwrap_or_default(),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `if content.is_some() { 1 } else { Default::default() }`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#obfuscated_if_else
= note: `#[warn(clippy::obfuscated_if_else)]` on by default
__END__
|
Loading