History

thanks clippy

Sebastian Thiel committed 3 years ago

Commit bac57dd1 parent e22080e100 files · +172 −230Browse files

Showing the changes to git-pack/src/data (4 of 100 files). Show all

Unified · Split

4 files
  1. git-pack/src/data/file/init.rs +1 −2
  2. git-pack/src/data/input/entries_to_bytes.rs +2 −2
  3. git-pack/src/data/output/count/objects/mod.rs +1 −1
  4. git-pack/src/data/output/entry/iter_from_counts.rs +1 −1
git-pack/src/data/file/init.rs+1−2
@@ -23,8 +23,7 @@ impl data::File { · 22 unmodified lines
2323 let pack_len = data.len();
2424 if pack_len < N32_SIZE * 3 + hash_len {
2525 return Err(data::header::decode::Error::Corrupt(format!(
26− "Pack data of size {} is too small for even an empty pack with shortest hash",
27− pack_len
26+ "Pack data of size {pack_len} is too small for even an empty pack with shortest hash"
2827 )));
2928 }
3029 let (kind, num_objects) =
git-pack/src/data/input/entries_to_bytes.rs+2−2
@@ -90,11 +90,11 @@ where · 89 unmodified lines
9090 } else {
9191 header_bytes.len() as u64
9292 };
93− self.output.seek(std::io::SeekFrom::Start(0))?;
93+ self.output.rewind()?;
9494 self.output.write_all(&header_bytes[..])?;
9595 self.output.flush()?;
9696
97− self.output.seek(std::io::SeekFrom::Start(0))?;
97+ self.output.rewind()?;
9898 let interrupt_never = std::sync::atomic::AtomicBool::new(false);
9999 let digest = hash::bytes(
100100 &mut self.output,
git-pack/src/data/output/count/objects/mod.rs+1−1
@@ -79,7 +79,7 @@ where · 78 unmodified lines
7979 {
8080 let mut p = progress
8181 .lock()
82− .add_child_with_id(format!("thread {}", n), git_features::progress::UNKNOWN);
82+ .add_child_with_id(format!("thread {n}"), git_features::progress::UNKNOWN);
8383 p.init(None, git_features::progress::count("objects"));
8484 p
8585 },
git-pack/src/data/output/entry/iter_from_counts.rs+1−1
@@ -143,7 +143,7 @@ pub(crate) mod function { · 142 unmodified lines
143143 Vec::new(), // object data buffer
144144 progress
145145 .lock()
146− .add_child_with_id(format!("thread {}", n), git_features::progress::UNKNOWN),
146+ .add_child_with_id(format!("thread {n}"), git_features::progress::UNKNOWN),
147147 )
148148 }
149149 },

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t