mirror of
https://github.com/Cuprate/cuprate.git
synced 2025-03-22 15:18:45 +00:00
13 lines
251 B
Rust
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()
|
|
}
|