refactor: Use variables directly in formatted strings (#7284)

made with `cargo clippy --all --fix` then manually reviewed to ensure
this was the only thing that changed.
This commit is contained in:
Simon Laux
2025-10-09 17:26:59 +02:00
committed by GitHub
parent 00ae7ce33c
commit af58b86b60
23 changed files with 55 additions and 76 deletions

View File

@@ -279,7 +279,7 @@ impl Context {
};
if !valid {
bail!("{} is not a valid webxdc file", filename);
bail!("{filename} is not a valid webxdc file");
}
Ok(())
@@ -837,8 +837,8 @@ fn parse_webxdc_manifest(bytes: &[u8]) -> Result<WebxdcManifest> {
}
async fn get_blob(archive: &mut SeekZipFileReader<BufReader<File>>, name: &str) -> Result<Vec<u8>> {
let (i, _) = find_zip_entry(archive.file(), name)
.ok_or_else(|| anyhow!("no entry found for {}", name))?;
let (i, _) =
find_zip_entry(archive.file(), name).ok_or_else(|| anyhow!("no entry found for {name}"))?;
let mut reader = archive.reader_with_entry(i).await?;
let mut buf = Vec::new();
reader.read_to_end_checked(&mut buf).await?;