bytecodealliance / wasm-tools

CLI and Rust libraries for low-level manipulation of WebAssembly modules
Apache License 2.0
1.36k stars 246 forks source link

Remove a copy being made of wasm modules #1877

Closed alexcrichton closed 1 month ago

alexcrichton commented 1 month ago

This commit removes a copy performed when the input file is WebAssembly when parsing input files on the CLI. This happened due to the implementation of Cow::to_owned but isn't necessary since we have the original owned copy around to return that instead.