History

update dependencie

Sebastian Thiel committed 6 years ago

Commit ade06b41 parent 310a59e2 files · +60 −37Browse files

Showing the changes to git-features/src/progress (1 of 2 files). Show all

Unified · Split

git-features/src/progress/mod.rs+10−7
@@ -3,12 +3,15 @@ use std::io; · 2 unmodified lines
3pub use prodash::progress::{Discard, DoOrDiscard, Either, ThroughputOnDrop};3pub use prodash::progress::{Discard, DoOrDiscard, Either, ThroughputOnDrop};
4pub use prodash::{unit, Progress, Unit};4pub use prodash::{unit, Progress, Unit};
5 5
6pub fn bytes() -> Unit {6pub fn bytes() -> Option<Unit> {
7 unit::dynamic_and_mode(unit::Bytes, unit::display::Mode::with_throughput().and_percentage())7 Some(unit::dynamic_and_mode(
8 unit::Bytes,
9 unit::display::Mode::with_throughput().and_percentage(),
10 ))
8}11}
9 12
10pub fn count(name: &'static str) -> Unit {13pub fn count(name: &'static str) -> Option<Unit> {
11 unit::dynamic_and_mode(14 Some(unit::dynamic_and_mode(
12 unit::Human::new(15 unit::Human::new(
13 {16 {
14 let mut f = unit::human::Formatter::new();17 let mut f = unit::human::Formatter::new();
@@ -18,11 +21,11 @@ pub fn count(name: &'static str) -> Unit { · 3 unmodified lines
18 name,21 name,
19 ),22 ),
20 unit::display::Mode::with_throughput().and_percentage(),23 unit::display::Mode::with_throughput().and_percentage(),
21 )24 ))
22}25}
23 26
24pub fn steps() -> Unit {27pub fn steps() -> Option<Unit> {
25 unit::dynamic(unit::Range::new("steps"))28 Some(unit::dynamic(unit::Range::new("steps")))
26}29}
27 30
28/// A structure passing every 'read' call through to the contained Progress instance using `inc_by(bytes_read)`.31/// A structure passing every 'read' call through to the contained Progress instance using `inc_by(bytes_read)`.