Skip to content

Commit

Permalink
fix: use self where possible
Browse files Browse the repository at this point in the history
  • Loading branch information
ishaan26 committed Sep 30, 2024
1 parent 609e81a commit 3db0942
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions zung_mini/src/progbar/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -185,10 +185,10 @@ trait ProgBarDisplay: Sized {

impl ProgBarDisplay for UnBounded {
fn display<T>(&self, progress: &ProgBar<T, Self>) {
let spinner_step = progress.bound.spinner_step.get();
progress.bound.spinner_step.set(spinner_step + 1);
if spinner_step > progress.bound.spinner.len() - 2 {
progress.bound.spinner_step.set(0);
let spinner_step = self.spinner_step.get();
self.spinner_step.set(spinner_step + 1);
if spinner_step > self.spinner.len() - 2 {
self.spinner_step.set(0);
}

print!(
Expand Down

0 comments on commit 3db0942

Please sign in to comment.