diff --git a/src/embedded.rs b/src/embedded.rs index d7952a1f..a84e332b 100644 --- a/src/embedded.rs +++ b/src/embedded.rs @@ -25,9 +25,9 @@ impl WriteStrategy { .open(path), }; - file.context("Failed to open the file `{path}` in write mode")? + file.with_context(|| format!("Failed to open the file `{path}` in write mode"))? .write_all(content) - .context("Failed to write the file {path}") + .with_context(|| format!("Failed to write the file {path}")) } }