summaryrefslogtreecommitdiff
path: root/crates/wasm-testsuite/lib.rs
diff options
context:
space:
mode:
authorHenry Gressmann <mail@henrygressmann.de>2024-08-12 16:12:07 +0200
committerHenry Gressmann <mail@henrygressmann.de>2024-08-12 16:12:07 +0200
commit06f81026eca6446d737e3759951ca15001a819c5 (patch)
treee06d747eb225cac6e24557faa2694895d52741ae /crates/wasm-testsuite/lib.rs
parentd33a0c66a17316755e572b3620fb030ec1e52f61 (diff)
chore: clean up code
Signed-off-by: Henry Gressmann <mail@henrygressmann.de>
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),
}
}