Skip to content

Commit 26b2741

Browse files
committed
Warn when commands are not run
``` warning: unused `rustwide::cmd::Command` that must be used --> src/docbuilder/rustwide_builder.rs:591:9 | 591 | build.cmd("mkdir").args(&["iPhoneOS.platform"]); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: `#[warn(unused_must_use)]` on by default = note: call `.run()` to run the command ```
1 parent 7cc10ac commit 26b2741

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/cmd/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,7 @@ impl<'a, B: Runnable> Runnable for &'a B {
188188
/// output processing, output logging and sandboxing.
189189
///
190190
/// [std]: https://doc.rust-lang.org/std/process/struct.Command.html
191+
#[must_use = "call `.run()` to run the command"]
191192
pub struct Command<'w, 'pl> {
192193
workspace: Option<&'w Workspace>,
193194
sandbox: Option<SandboxBuilder>,

0 commit comments

Comments
 (0)