From 06f81026eca6446d737e3759951ca15001a819c5 Mon Sep 17 00:00:00 2001 From: Henry Gressmann Date: Mon, 12 Aug 2024 16:12:07 +0200 Subject: chore: clean up code Signed-off-by: Henry Gressmann --- crates/wasm-testsuite/lib.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'crates/wasm-testsuite/lib.rs') diff --git a/crates/wasm-testsuite/lib.rs b/crates/wasm-testsuite/lib.rs index 466f7d2..93f750c 100644 --- a/crates/wasm-testsuite/lib.rs +++ b/crates/wasm-testsuite/lib.rs @@ -66,12 +66,10 @@ pub fn get_tests(include_proposals: &[String]) -> impl Iterator { /// Get the WAST file as a byte slice. pub fn get_test_wast(name: &str) -> Option> { - if !name.ends_with(".wast") { - panic!("Expected .wast file. Got: {}", name); - } + assert!(name.ends_with(".wast"), "Expected .wast file. Got: {name}"); match name.contains('/') { - true => Asset::get(&format!("proposals/{}", name)).map(|x| x.data), + true => Asset::get(&format!("proposals/{name}")).map(|x| x.data), false => Asset::get(name).map(|x| x.data), } } -- cgit v1.3.1