mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 19:47:45 +00:00
dd: implement Add for WriteStat
This commit is contained in:
parent
5142f35f83
commit
b383e60998
1 changed files with 11 additions and 0 deletions
|
@ -379,6 +379,17 @@ impl std::ops::AddAssign for WriteStat {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl std::ops::Add for WriteStat {
|
||||||
|
type Output = Self;
|
||||||
|
fn add(self, other: Self) -> Self {
|
||||||
|
Self {
|
||||||
|
writes_complete: self.writes_complete + other.writes_complete,
|
||||||
|
writes_partial: self.writes_partial + other.writes_partial,
|
||||||
|
bytes_total: self.bytes_total + other.bytes_total,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// How much detail to report when printing transfer statistics.
|
/// How much detail to report when printing transfer statistics.
|
||||||
///
|
///
|
||||||
/// This corresponds to the available settings of the `status`
|
/// This corresponds to the available settings of the `status`
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue