Skip to content

Commit

Permalink
Remove duplicate API
Browse files Browse the repository at this point in the history
finish_using_current_pos() was equivalent to using abandon().
  • Loading branch information
djc committed Feb 18, 2022
1 parent 200d049 commit add7578
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 11 deletions.
6 changes: 0 additions & 6 deletions src/progress_bar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -325,12 +325,6 @@ impl ProgressBar {
.finish_using_style(Instant::now(), ProgressFinish::AndLeave);
}

/// Finishes the progress bar at current position and leaves the current message
pub fn finish_at_current_pos(&self) {
self.state()
.finish_using_style(Instant::now(), ProgressFinish::AtCurrentPos);
}

/// Finishes the progress bar and sets a message
///
/// For the message to be visible, the `{msg}` placeholder must be present in the template (see
Expand Down
5 changes: 0 additions & 5 deletions src/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ impl BarState {
let (mut pos, mut status) = (None, Status::DoneVisible);
match finish {
ProgressFinish::AndLeave => pos = Some(self.state.len),
ProgressFinish::AtCurrentPos => {}
ProgressFinish::WithMessage(msg) => {
pos = Some(self.state.len);
self.state.message = msg;
Expand Down Expand Up @@ -290,10 +289,6 @@ pub enum ProgressFinish {
///
/// Same behavior as calling [`ProgressBar::finish()`](crate::ProgressBar::finish).
AndLeave,
/// Finishes the progress bar at current position and leaves the current message
///
/// Same behavior as calling [`ProgressBar::finish_at_current_pos()`](crate::ProgressBar::finish_at_current_pos).
AtCurrentPos,
/// Finishes the progress bar and sets a message
///
/// Same behavior as calling [`ProgressBar::finish_with_message()`](crate::ProgressBar::finish_with_message).
Expand Down

0 comments on commit add7578

Please sign in to comment.