summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenry Gressmann <mail@henrygressmann.de>2023-12-19 17:43:41 +0100
committerHenry Gressmann <mail@henrygressmann.de>2023-12-19 17:43:41 +0100
commit223ad508cafdd6dd2fe9f37f257becbe160f8922 (patch)
treee9495d70433fd73a18b35b0c567831c92988754d
parenta8269d7c0bf5e4c21d5d5dbb728e0ba4c63fa50e (diff)
chore: cleanup clippy errors
Signed-off-by: Henry Gressmann <mail@henrygressmann.de>
-rw-r--r--crates/parser/src/conversion.rs2
-rw-r--r--crates/parser/src/module.rs5
-rw-r--r--crates/tinywasm/tests/progress-mvp.svg6
3 files changed, 5 insertions, 8 deletions
diff --git a/crates/parser/src/conversion.rs b/crates/parser/src/conversion.rs
index 1594bf7..e3dffbc 100644
--- a/crates/parser/src/conversion.rs
+++ b/crates/parser/src/conversion.rs
@@ -18,7 +18,7 @@ pub(crate) fn convert_module_imports<'a, T: IntoIterator<Item = wasmparser::Resu
Ok(imports)
}
-pub(crate) fn convert_module_import<'a>(import: wasmparser::Import<'a>) -> Result<Import> {
+pub(crate) fn convert_module_import(import: wasmparser::Import<'_>) -> Result<Import> {
Ok(Import {
module: import.module.to_string(),
name: import.name.to_string(),
diff --git a/crates/parser/src/module.rs b/crates/parser/src/module.rs
index 790b9a2..0dbd36b 100644
--- a/crates/parser/src/module.rs
+++ b/crates/parser/src/module.rs
@@ -129,10 +129,7 @@ impl ModuleReader {
ImportSection(reader) => {
debug!("Found import section");
validator.import_section(&reader)?;
- self.imports = reader
- .into_iter()
- .map(|i| conversion::convert_module_import(i?))
- .collect::<Result<Vec<_>>>()?;
+ self.imports = conversion::convert_module_imports(reader)?;
}
ExportSection(reader) => {
debug!("Found export section");
diff --git a/crates/tinywasm/tests/progress-mvp.svg b/crates/tinywasm/tests/progress-mvp.svg
index 854fdf9..779678d 100644
--- a/crates/tinywasm/tests/progress-mvp.svg
+++ b/crates/tinywasm/tests/progress-mvp.svg
@@ -49,11 +49,11 @@ v0.0.5 (11135)
</text>
<polyline fill="none" opacity="1" stroke="#000000" stroke-width="1" points="648,345 648,350 "/>
<text x="875" y="355" dy="0.76em" text-anchor="middle" font-family="Victor Mono" font-size="12.096774193548388" opacity="1" fill="#000000">
-v0.0.6-alpha.0 (11135)
+v0.0.6-alpha.0 (11200)
</text>
<polyline fill="none" opacity="1" stroke="#000000" stroke-width="1" points="875,345 875,350 "/>
-<rect x="85" y="212" width="217" height="132" opacity="0.5" fill="#0000FF" stroke="none"/>
-<rect x="767" y="185" width="217" height="159" opacity="0.5" fill="#0000FF" stroke="none"/>
<rect x="539" y="185" width="218" height="159" opacity="0.5" fill="#0000FF" stroke="none"/>
<rect x="312" y="212" width="217" height="132" opacity="0.5" fill="#0000FF" stroke="none"/>
+<rect x="767" y="184" width="217" height="160" opacity="0.5" fill="#0000FF" stroke="none"/>
+<rect x="85" y="212" width="217" height="132" opacity="0.5" fill="#0000FF" stroke="none"/>
</svg>