From c6fd6315304febb235ebd755751b63487c82af0b Mon Sep 17 00:00:00 2001 From: Jordan Doyle Date: Tue, 4 Jul 2023 18:59:10 +0100 Subject: [PATCH] Fix failing clippy lints --- Cargo.toml | 2 +- src/high_level.rs | 2 +- src/low_level.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 2b81fb8..7cf6a2b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,7 +16,7 @@ repository = "https://github.com/w4/packfile" bytes = "1.2" flate2 = "1.0" hex = "0.4" -indexmap = "1.9" +indexmap = "2.0" itoa = "1.0" sha1 = "0.10" thiserror = "1.0" diff --git a/src/high_level.rs b/src/high_level.rs index c49f165..08a4bd7 100644 --- a/src/high_level.rs +++ b/src/high_level.rs @@ -145,7 +145,7 @@ impl Tree { }, TreeItem::Tree(tree) => LowLevelTreeItem { kind: TreeItemKind::Directory, - sort_name: format!("{}/", name), + sort_name: format!("{name}/"), name, // we're essentially working through our tree from the bottom up, // so we can grab the hash of each directory along the way and diff --git a/src/low_level.rs b/src/low_level.rs index f9ca68d..1e91487 100644 --- a/src/low_level.rs +++ b/src/low_level.rs @@ -331,7 +331,7 @@ impl PackFileEntry { let mut out = BytesMut::with_capacity(file_prefix.len() + " ".len() + size_len + "\n".len() + size); - write!(out, "{} {}\0", file_prefix, size)?; + write!(out, "{file_prefix} {size}\0")?; match self { Self::Commit(commit) => { commit.encode_to(&mut out)?; -- libgit2 1.7.2