Showing the changes to git-pack/src/data (4 of 100 files). Show all
Unified · Split
| @@ -23,8 +23,7 @@ impl data::File { · 22 unmodified lines | ||
| 23 | 23 | let pack_len = data.len(); |
| 24 | 24 | if pack_len < N32_SIZE * 3 + hash_len { |
| 25 | 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", | |
| 27 | − pack_len | |
| 26 | + "Pack data of size {pack_len} is too small for even an empty pack with shortest hash" | |
| 28 | 27 | ))); |
| 29 | 28 | } |
| 30 | 29 | let (kind, num_objects) = |
| @@ -90,11 +90,11 @@ where · 89 unmodified lines | ||
| 90 | 90 | } else { |
| 91 | 91 | header_bytes.len() as u64 |
| 92 | 92 | }; |
| 93 | − self.output.seek(std::io::SeekFrom::Start(0))?; | |
| 93 | + self.output.rewind()?; | |
| 94 | 94 | self.output.write_all(&header_bytes[..])?; |
| 95 | 95 | self.output.flush()?; |
| 96 | 96 | |
| 97 | − self.output.seek(std::io::SeekFrom::Start(0))?; | |
| 97 | + self.output.rewind()?; | |
| 98 | 98 | let interrupt_never = std::sync::atomic::AtomicBool::new(false); |
| 99 | 99 | let digest = hash::bytes( |
| 100 | 100 | &mut self.output, |
| @@ -79,7 +79,7 @@ where · 78 unmodified lines | ||
| 79 | 79 | { |
| 80 | 80 | let mut p = progress |
| 81 | 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 | 83 | p.init(None, git_features::progress::count("objects")); |
| 84 | 84 | p |
| 85 | 85 | }, |
| @@ -143,7 +143,7 @@ pub(crate) mod function { · 142 unmodified lines | ||
| 143 | 143 | Vec::new(), // object data buffer |
| 144 | 144 | progress |
| 145 | 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 | }, |