From 9b5b607fd813071ab85d67cae3d6517e3bd586e8 Mon Sep 17 00:00:00 2001 From: Callum Ryan Date: Thu, 17 Oct 2024 06:33:35 -0700 Subject: [PATCH] Fix must_use lint for command exec tests --- tests/ui/command/command-exec.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/ui/command/command-exec.rs b/tests/ui/command/command-exec.rs index c97b8561410..d2545b0b472 100644 --- a/tests/ui/command/command-exec.rs +++ b/tests/ui/command/command-exec.rs @@ -26,23 +26,23 @@ fn main() { } "exec-test2" => { - Command::new("/path/to/nowhere").exec(); + let _ = Command::new("/path/to/nowhere").exec(); println!("passed"); } "exec-test3" => { - Command::new(&me).arg("bad\0").exec(); + let _ = Command::new(&me).arg("bad\0").exec(); println!("passed"); } "exec-test4" => { - Command::new(&me).current_dir("/path/to/nowhere").exec(); + let _ = Command::new(&me).current_dir("/path/to/nowhere").exec(); println!("passed"); } "exec-test5" => { env::set_var("VARIABLE", "ABC"); - Command::new("definitely-not-a-real-binary").env("VARIABLE", "XYZ").exec(); + let _ = Command::new("definitely-not-a-real-binary").env("VARIABLE", "XYZ").exec(); assert_eq!(env::var("VARIABLE").unwrap(), "ABC"); println!("passed"); }