From 5e9959e8f595e7a6aa20082efe00c8859eef29dc Mon Sep 17 00:00:00 2001 From: Daniel Verkamp Date: Thu, 19 Aug 2021 17:09:59 -0700 Subject: [PATCH] main: replace assert_eq!(..., true/false) with assert!() BUG=b:197251702 TEST=bin/clippy # with rust-toolchain = 1.54.0 Change-Id: I80b8a5e4a90f2d6aefafd3d0d4b64b6751163b25 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3108611 Tested-by: kokoro Commit-Queue: Daniel Verkamp Reviewed-by: Allen Webb --- src/main.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main.rs b/src/main.rs index d29ee9aeaf..47e07beffa 100644 --- a/src/main.rs +++ b/src/main.rs @@ -3018,7 +3018,7 @@ mod tests { .expect("parse should succeed"); assert_eq!(config.plugin_mounts[0].src, PathBuf::from("/dev/null")); assert_eq!(config.plugin_mounts[0].dst, PathBuf::from("/dev/zero")); - assert_eq!(config.plugin_mounts[0].writable, true); + assert!(config.plugin_mounts[0].writable); } #[test] @@ -3026,15 +3026,15 @@ mod tests { let mut config = Config::default(); set_argument(&mut config, "plugin-mount", Some("/dev/null")).expect("parse should succeed"); assert_eq!(config.plugin_mounts[0].dst, PathBuf::from("/dev/null")); - assert_eq!(config.plugin_mounts[0].writable, false); + assert!(!config.plugin_mounts[0].writable); set_argument(&mut config, "plugin-mount", Some("/dev/null:/dev/zero")) .expect("parse should succeed"); assert_eq!(config.plugin_mounts[1].dst, PathBuf::from("/dev/zero")); - assert_eq!(config.plugin_mounts[1].writable, false); + assert!(!config.plugin_mounts[1].writable); set_argument(&mut config, "plugin-mount", Some("/dev/null::true")) .expect("parse should succeed"); assert_eq!(config.plugin_mounts[2].dst, PathBuf::from("/dev/null")); - assert_eq!(config.plugin_mounts[2].writable, true); + assert!(config.plugin_mounts[2].writable); } #[test]