Skip to content

Commit c99d806

Browse files
SteveL-MSFTtgauth
andauthored
Update dsc_lib/src/progress.rs
Co-authored-by: Tess Gauthier <[email protected]>
1 parent a087de5 commit c99d806

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

dsc_lib/src/progress.rs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -116,13 +116,7 @@ impl ProgressBar {
116116

117117
self.item_position += delta;
118118

119-
if self.item_count > 0 {
120-
self.progress_value.percent_complete = if self.item_position >= self.item_count {
121-
100
122-
} else {
123-
u8::try_from((self.item_position * 100) / self.item_count).unwrap_or(100)
124-
};
125-
}
119+
self.set_percent_complete();
126120

127121
if self.format == ProgressFormat::Json {
128122
self.write_json();

0 commit comments

Comments
 (0)