cuprate_rpc_types/
free.rs

1//! Free functions.
2
3//---------------------------------------------------------------------------------------------------- Serde
4// These are functions used for conditionally (de)serialization.
5
6/// Returns `true` if the input `u` is equal to `0`.
7#[inline]
8#[expect(clippy::trivially_copy_pass_by_ref, reason = "serde signature")]
9#[expect(dead_code, reason = "TODO: see if needed after handlers.")]
10pub(crate) const fn is_zero(u: &u64) -> bool {
11    *u == 0
12}
13
14/// Returns `true` the input `u` is equal to `1`.
15#[inline]
16#[expect(clippy::trivially_copy_pass_by_ref, reason = "serde signature")]
17#[expect(dead_code, reason = "TODO: see if needed after handlers.")]
18pub(crate) const fn is_one(u: &u64) -> bool {
19    *u == 1
20}