We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d7912fb commit 8819cc8Copy full SHA for 8819cc8
src/bit/decimal.rs
@@ -67,10 +67,7 @@ impl Bit {
67
let v = {
68
match unit {
69
Unit::Bit => size,
70
- _ => match size.checked_mul(Decimal::from(unit.as_bits_u128())) {
71
- Some(v) => v,
72
- None => return None,
73
- },
+ _ => size.checked_mul(Decimal::from(unit.as_bits_u128()))?,
74
}
75
};
76
src/byte/decimal.rs
@@ -70,10 +70,7 @@ impl Byte {
Unit::Bit => (size / DECIMAL_EIGHT).ceil(),
Unit::B => size,
- _ => match size.checked_mul(Decimal::from(unit.as_bytes_u128())) {
+ _ => size.checked_mul(Decimal::from(unit.as_bytes_u128()))?,
77
78
79
0 commit comments