Skip to content

Commit

Permalink
Add 'update_percet' method
Browse files Browse the repository at this point in the history
  • Loading branch information
rustworthy committed Feb 2, 2024
1 parent 2dd891f commit d745549
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/proto/single/ent.rs
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,10 @@ impl Progress {
///
/// This will copy the [`desc`](Progress::desc) from the `Progress` (retrieved) over to `ProgressUpdate` (to be sent).
pub fn update_percent(&self, percent: u8) -> ProgressUpdate {
set_progress(&self.jid, percent)
ProgressUpdate::builder(&self.jid)
.desc(self.desc.clone())
.percent(percent)
.build()
}

Check warning on line 172 in src/proto/single/ent.rs

View check run for this annotation

Codecov / codecov/patch

src/proto/single/ent.rs#L167-L172

Added lines #L167 - L172 were not covered by tests

/// Create an instance of `ProgressUpdateBuilder` for the job.
Expand Down

0 comments on commit d745549

Please sign in to comment.