fix top level def

This commit is contained in:
Folkert 2021-02-02 16:24:21 +01:00
parent 851f472167
commit e83cb0d027
6 changed files with 31 additions and 28 deletions

View file

@ -239,10 +239,10 @@ impl Progress {
Self::from_consumed(before - after)
}
pub fn from_consumed(chars_consumed: usize) -> Self {
Self::from_bool(chars_consumed != 0)
Self::progress_when(chars_consumed != 0)
}
pub fn from_bool(made_progress: bool) -> Self {
pub fn progress_when(made_progress: bool) -> Self {
if made_progress {
Progress::MadeProgress
} else {