cuprate/net/monero-wire/src/serde_helpers.rs
Boog900 2033a2d16c
add rules for blocks
TODO: the tests need re-ordering they are just all chucked in at the moment.
2023-10-24 23:02:19 +01:00

13 lines
251 B
Rust

pub(crate) fn default_false() -> bool {
false
}
pub(crate) fn default_true() -> bool {
true
}
pub(crate) fn default_zero<T: TryFrom<u8>>() -> T {
0.try_into()
.map_err(|_| "Couldn't fit 0 into integer type!")
.unwrap()
}