diff --git a/tests/compile_time.rs b/tests/compile_time.rs index 7926b36..1c27197 100644 --- a/tests/compile_time.rs +++ b/tests/compile_time.rs @@ -6,7 +6,7 @@ use xshell::{cmd, Shell}; fn fixed_cost_compile_times() { let mut sh = Shell::new().unwrap(); - let _p = sh.set_current_dir("tests/data"); + sh.set_current_dir("tests/data"); let baseline = compile_bench(&mut sh, "baseline"); let _ducted = compile_bench(&sh, "ducted"); let xshelled = compile_bench(&mut sh, "xshelled"); diff --git a/tests/it/env.rs b/tests/it/env.rs index 2c73333..6d20be0 100644 --- a/tests/it/env.rs +++ b/tests/it/env.rs @@ -34,8 +34,8 @@ fn test_env() { ); } - let _g1 = sh.set_var(v1, "foobar"); - let _g2 = sh.set_var(v2, "quark"); + sh.set_var(v1, "foobar"); + sh.set_var(v2, "quark"); assert_env(cmd!(sh, "xecho -$ {v1} {v2}"), &[(v1, Some("foobar")), (v2, Some("quark"))]); assert_env(cmd!(cloned_sh, "xecho -$ {v1} {v2}"), &[(v1, None), (v2, None)]); @@ -79,8 +79,8 @@ fn test_env_clear() { &[(v1, Some("789")), (v2, None)], ); - let _g1 = sh.set_var(v1, "foobar"); - let _g2 = sh.set_var(v2, "quark"); + sh.set_var(v1, "foobar"); + sh.set_var(v2, "quark"); assert_env(cmd!(sh, "{xecho} -$ {v1} {v2}").env_clear(), &[(v1, None), (v2, None)]); assert_env( diff --git a/tests/it/main.rs b/tests/it/main.rs index f7b3525..4959376 100644 --- a/tests/it/main.rs +++ b/tests/it/main.rs @@ -326,7 +326,7 @@ fn test_subshells_env() { assert_eq!(e2.as_deref(), Some("1".as_ref())); { let mut sh = sh.clone(); - let _e = sh.set_var(VAR, "2"); + sh.set_var(VAR, "2"); let e3 = sh.var_os(VAR); assert_eq!(e3.as_deref(), Some("2".as_ref())); } @@ -383,14 +383,14 @@ fn test_copy_file() { fn test_exists() { let mut sh = setup(); let tmp = sh.create_temp_dir().unwrap(); - let _d = sh.set_current_dir(tmp.path()); + sh.set_current_dir(tmp.path()); assert!(!sh.path_exists("foo.txt")); sh.write_file("foo.txt", "foo").unwrap(); assert!(sh.path_exists("foo.txt")); assert!(!sh.path_exists("bar")); sh.create_dir("bar").unwrap(); assert!(sh.path_exists("bar")); - let _d = sh.set_current_dir("bar"); + sh.set_current_dir("bar"); assert!(!sh.path_exists("quz.rs")); sh.write_file("quz.rs", "fn main () {}").unwrap(); assert!(sh.path_exists("quz.rs"));