rust: drop the useless Command::from in the CLI test template
cargo_bin_cmd! already returns an assert_cmd::Command, so the wrapper
failed clippy::useless_conversion under -D warnings.
Assisted-by: Claude Opus 5 via Claude Code
diff --git a/ai/skills/rust/binary.md b/ai/skills/rust/binary.md
index 9b5db6ab..60c0085a 100644
--- a/ai/skills/rust/binary.md
+++ b/ai/skills/rust/binary.md
@@ -125,10 +125,9 @@ Notes:
```rust
use assert_cmd::Command;
use assert_cmd::cargo::cargo_bin_cmd;
-use tempfile::tempdir;
fn cmd() -> Command {
- Command::from(cargo_bin_cmd!("<name>"))
+ cargo_bin_cmd!("<name>")
}
#[test]
@@ -137,6 +136,16 @@ fn shows_help() {
}
```
+`cargo_bin_cmd!` expands to `assert_cmd::Command::new(...)`, so it needs
+no conversion — wrapping it in `Command::from` trips
+`clippy::useless_conversion`. Pass the bin target name explicitly: the
+no-argument form resolves the *package* name, which differs from the
+binary name whenever the crate is named something like `<name>-cli`.
+
+Integration tests are compiled with `--test`, so `cfg(test)` is set and
+the `#![cfg_attr(test, allow(...))]` panic-lint exemption from
+`scaffolding.md` applies here too.
+
## Release
CalVer (`YYYY-MM-DD+SHORT_SHA`) with automatic releases on green