From 7cab8f786280ab249d8e0711d085d853aa41629f Mon Sep 17 00:00:00 2001 From: hi-rustin Date: Sun, 2 Jul 2023 12:07:25 +0800 Subject: [PATCH] Fix broken tests Signed-off-by: hi-rustin --- src/bootstrap/config/tests.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/bootstrap/config/tests.rs b/src/bootstrap/config/tests.rs index 6ec24530af2..732df54cdac 100644 --- a/src/bootstrap/config/tests.rs +++ b/src/bootstrap/config/tests.rs @@ -181,8 +181,6 @@ fn profile_user_dist() { #[test] fn rust_optimize() { - let parse = |s| Config::parse_inner(&["check".to_owned()], |&_| toml::from_str(s).unwrap()); - assert_eq!(parse("").rust_optimize.is_release(), true); assert_eq!(parse("rust.optimize = false").rust_optimize.is_release(), false); assert_eq!(parse("rust.optimize = true").rust_optimize.is_release(), true); @@ -193,7 +191,5 @@ fn rust_optimize() { #[test] #[should_panic] fn invalid_rust_optimize() { - Config::parse_inner(&["check".to_owned()], |&_| { - toml::from_str("rust.optimize = \"a\"").unwrap() - }); + parse("rust.optimize = \"a\""); }