mirror of
https://github.com/Byron/gitoxide
synced 2025-10-06 01:52:40 +02:00
Thanks clippy
This fixes new clippy errors about missed opportunities to place single variable names inside a format string rather than as separate arguments.
This commit is contained in:
@@ -262,7 +262,7 @@ pub fn run<P: NestedProgress>(
|
||||
}
|
||||
|
||||
if num_errors > 0 {
|
||||
anyhow::bail!("Failed to handle {} repositories", num_errors)
|
||||
anyhow::bail!("Failed to handle {num_errors} repositories")
|
||||
} else {
|
||||
Ok(())
|
||||
}
|
||||
|
@@ -186,7 +186,7 @@ where
|
||||
))
|
||||
}
|
||||
}
|
||||
ext => return Err(anyhow!("Unknown extension {:?}, expecting 'idx' or 'pack'", ext)),
|
||||
ext => return Err(anyhow!("Unknown extension {ext:?}, expecting 'idx' or 'pack'")),
|
||||
};
|
||||
if let Some(stats) = res.1.as_ref() {
|
||||
#[cfg_attr(not(feature = "serde"), allow(clippy::single_match))]
|
||||
|
@@ -41,7 +41,7 @@ pub fn display_object(
|
||||
let data = resource
|
||||
.data
|
||||
.as_slice()
|
||||
.ok_or_else(|| anyhow!("Binary data at {} cannot be diffed", path))?;
|
||||
.ok_or_else(|| anyhow!("Binary data at {path} cannot be diffed"))?;
|
||||
out.write_all(data)?;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user