Skip to content

Commit d93311d

Browse files
committed
feat!: use prodash::Count to indicate that nothing more than counting is performed, in place of prodash::Progress
1 parent ed327f6 commit d93311d

File tree

5 files changed

+18
-21
lines changed

5 files changed

+18
-21
lines changed

gix-pack/src/data/file/verify.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
use std::sync::atomic::AtomicBool;
2-
31
use gix_features::progress::Progress;
2+
use std::sync::atomic::AtomicBool;
43

54
use crate::data::File;
65

gix-pack/src/data/output/count/objects/mod.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ where
111111
pub fn objects_unthreaded<Find, IterErr, Oid>(
112112
db: Find,
113113
object_ids: impl Iterator<Item = std::result::Result<Oid, IterErr>>,
114-
mut progress: impl Progress,
114+
mut progress: impl gix_features::progress::Count,
115115
should_interrupt: &AtomicBool,
116116
input_object_expansion: ObjectExpansion,
117117
) -> Result<find::existing::Error<Find::Error>, IterErr>
@@ -139,7 +139,6 @@ where
139139
mod expand {
140140
use std::sync::atomic::{AtomicBool, Ordering};
141141

142-
use gix_features::progress::Progress;
143142
use gix_hash::{oid, ObjectId};
144143
use gix_object::{CommitRefIter, TagRefIter};
145144

@@ -161,7 +160,7 @@ mod expand {
161160
oids: impl IntoIterator<Item = std::result::Result<Oid, IterErr>>,
162161
buf1: &mut Vec<u8>,
163162
#[allow(clippy::ptr_arg)] buf2: &mut Vec<u8>,
164-
progress: &mut impl Progress,
163+
progress: &mut impl gix_features::progress::Count,
165164
should_interrupt: &AtomicBool,
166165
allow_pack_lookups: bool,
167166
) -> super::Result<find::existing::Error<Find::Error>, IterErr>
@@ -368,7 +367,7 @@ mod expand {
368367
all_seen: &impl util::InsertImmutable,
369368
id: &oid,
370369
location: Option<crate::data::entry::Location>,
371-
progress: &mut impl Progress,
370+
progress: &mut impl gix_features::progress::Count,
372371
statistics: &mut Outcome,
373372
count_expanded: bool,
374373
) {
@@ -388,7 +387,7 @@ mod expand {
388387
db: &Find,
389388
buf: &mut Vec<u8>,
390389
id: &oid,
391-
progress: &mut impl Progress,
390+
progress: &mut impl gix_features::progress::Count,
392391
statistics: &mut Outcome,
393392
allow_pack_lookups: bool,
394393
) -> output::Count {

gix-protocol/tests/fetch/mod.rs

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,6 @@ impl fetch::DelegateBlocking for LsRemoteDelegate {
152152
mod blocking_io {
153153
use std::io;
154154

155-
use gix_features::progress::Progress;
156155
use gix_protocol::{fetch, fetch::Response, handshake, handshake::Ref};
157156

158157
use crate::fetch::{CloneDelegate, CloneRefInWantDelegate, LsRemoteDelegate};
@@ -161,7 +160,7 @@ mod blocking_io {
161160
fn receive_pack(
162161
&mut self,
163162
mut input: impl io::BufRead,
164-
_progress: impl Progress,
163+
_progress: impl gix_features::progress::Count,
165164
_refs: &[Ref],
166165
_previous_response: &Response,
167166
) -> io::Result<()> {
@@ -174,7 +173,7 @@ mod blocking_io {
174173
fn receive_pack(
175174
&mut self,
176175
mut input: impl io::BufRead,
177-
_progress: impl Progress,
176+
_progress: impl gix_features::progress::Count,
178177
_refs: &[Ref],
179178
response: &Response,
180179
) -> io::Result<()> {
@@ -193,7 +192,7 @@ mod blocking_io {
193192
fn receive_pack(
194193
&mut self,
195194
_input: impl io::BufRead,
196-
_progress: impl Progress,
195+
_progress: impl gix_features::progress::Count,
197196
_refs: &[Ref],
198197
_previous_response: &Response,
199198
) -> io::Result<()> {
@@ -208,7 +207,7 @@ mod async_io {
208207

209208
use async_trait::async_trait;
210209
use futures_io::AsyncBufRead;
211-
use gix_features::progress::Progress;
210+
use gix_features::progress::NestedProgress;
212211
use gix_protocol::{fetch, fetch::Response, handshake, handshake::Ref};
213212

214213
use crate::fetch::{CloneDelegate, CloneRefInWantDelegate, LsRemoteDelegate};
@@ -218,7 +217,7 @@ mod async_io {
218217
async fn receive_pack(
219218
&mut self,
220219
mut input: impl AsyncBufRead + Unpin + 'async_trait,
221-
_progress: impl Progress,
220+
_progress: impl NestedProgress,
222221
_refs: &[Ref],
223222
_previous_response: &Response,
224223
) -> io::Result<()> {
@@ -232,7 +231,7 @@ mod async_io {
232231
async fn receive_pack(
233232
&mut self,
234233
mut input: impl AsyncBufRead + Unpin + 'async_trait,
235-
_progress: impl Progress,
234+
_progress: impl NestedProgress,
236235
_refs: &[Ref],
237236
response: &Response,
238237
) -> io::Result<()> {
@@ -252,7 +251,7 @@ mod async_io {
252251
async fn receive_pack(
253252
&mut self,
254253
_input: impl AsyncBufRead + Unpin + 'async_trait,
255-
_progress: impl Progress,
254+
_progress: impl NestedProgress,
256255
_refs: &[Ref],
257256
_previous_response: &Response,
258257
) -> io::Result<()> {

gix-worktree-state/src/checkout/function.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use std::sync::atomic::AtomicBool;
22

3-
use gix_features::{interrupt, parallel::in_parallel_with_finalize, progress::Progress};
3+
use gix_features::{interrupt, parallel::in_parallel_with_finalize};
44
use gix_hash::oid;
55
use gix_worktree::{stack, Stack};
66

@@ -21,8 +21,8 @@ pub fn checkout<Find, E>(
2121
index: &mut gix_index::State,
2222
dir: impl Into<std::path::PathBuf>,
2323
find: Find,
24-
files: &mut impl Progress,
25-
bytes: &mut impl Progress,
24+
files: &mut impl gix_features::progress::Count,
25+
bytes: &mut impl gix_features::progress::Count,
2626
should_interrupt: &AtomicBool,
2727
options: crate::checkout::Options,
2828
) -> Result<crate::checkout::Outcome, crate::checkout::Error<E>>
@@ -42,8 +42,8 @@ fn checkout_inner<Find, E>(
4242
paths: &gix_index::PathStorage,
4343
dir: impl Into<std::path::PathBuf>,
4444
find: Find,
45-
files: &mut impl Progress,
46-
bytes: &mut impl Progress,
45+
files: &mut impl gix_features::progress::Count,
46+
bytes: &mut impl gix_features::progress::Count,
4747
should_interrupt: &AtomicBool,
4848
mut options: crate::checkout::Options,
4949
) -> Result<crate::checkout::Outcome, crate::checkout::Error<E>>

gix/src/repository/worktree.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ impl crate::Repository {
114114
&self,
115115
mut stream: gix_worktree_stream::Stream,
116116
out: impl std::io::Write + std::io::Seek,
117-
blobs: impl gix_features::progress::Progress,
117+
blobs: impl gix_features::progress::Count,
118118
should_interrupt: &std::sync::atomic::AtomicBool,
119119
options: gix_archive::Options,
120120
) -> Result<(), crate::repository::worktree_archive::Error> {

0 commit comments

Comments
 (0)