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
23 let pack_len = data.len();23 let pack_len = data.len();
24 if pack_len < N32_SIZE * 3 + hash_len {24 if pack_len < N32_SIZE * 3 + hash_len {
25 return Err(data::header::decode::Error::Corrupt(format!(25 return Err(data::header::decode::Error::Corrupt(format!(
26 "Pack data of size {} is too small for even an empty pack with shortest hash",26 "Pack data of size {pack_len} is too small for even an empty pack with shortest hash"
27 pack_len
28 )));27 )));
29 }28 }
30 let (kind, num_objects) =29 let (kind, num_objects) =
git-pack/src/data/input/entries_to_bytes.rs+2−2
@@ -90,11 +90,11 @@ where · 89 unmodified lines
90 } else {90 } else {
91 header_bytes.len() as u6491 header_bytes.len() as u64
92 };92 };
93 self.output.seek(std::io::SeekFrom::Start(0))?;93 self.output.rewind()?;
94 self.output.write_all(&header_bytes[..])?;94 self.output.write_all(&header_bytes[..])?;
95 self.output.flush()?;95 self.output.flush()?;
96 96
97 self.output.seek(std::io::SeekFrom::Start(0))?;97 self.output.rewind()?;
98 let interrupt_never = std::sync::atomic::AtomicBool::new(false);98 let interrupt_never = std::sync::atomic::AtomicBool::new(false);
99 let digest = hash::bytes(99 let digest = hash::bytes(
100 &mut self.output,100 &mut self.output,
git-pack/src/data/output/count/objects/mod.rs+1−1
@@ -79,7 +79,7 @@ where · 78 unmodified lines
79 {79 {
80 let mut p = progress80 let mut p = progress
81 .lock()81 .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);
83 p.init(None, git_features::progress::count("objects"));83 p.init(None, git_features::progress::count("objects"));
84 p84 p
85 },85 },
git-pack/src/data/output/entry/iter_from_counts.rs+1−1
@@ -143,7 +143,7 @@ pub(crate) mod function { · 142 unmodified lines
143 Vec::new(), // object data buffer143 Vec::new(), // object data buffer
144 progress144 progress
145 .lock()145 .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),
147 )147 )
148 }148 }
149 },149 },

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