summaryrefslogtreecommitdiff
path: root/crates/wasm-testsuite/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/wasm-testsuite/lib.rs')
-rw-r--r--crates/wasm-testsuite/lib.rs6
1 files changed, 2 insertions, 4 deletions
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<Item = String> {
/// Get the WAST file as a byte slice.
pub fn get_test_wast(name: &str) -> Option<Cow<'static, [u8]>> {
- 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),
}
}