Skip to content

Commit 6b67024

Browse files
chore: use with_context on file read
1 parent 0a579c4 commit 6b67024

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/utils.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ pub fn module_to_component(wasm_file: &PathBuf, adapt_file: &Option<PathBuf>) ->
8383
let mut encoder = wit_component::ComponentEncoder::default().validate(true);
8484
encoder = encoder.module(&wasm)?;
8585
let adapt_bytes = if let Some(adapt) = adapt_file {
86-
std::fs::read(adapt).context(format!("failed to read adapt file '{}'", adapt.display()))?
86+
std::fs::read(adapt).with_context(|| format!("failed to read adapt file '{}'", adapt.display()))?
8787
} else {
8888
WASIP1_SNAPSHOT_ADAPT.to_vec()
8989
};

0 commit comments

Comments
 (0)