mirror of
https://github.com/hinto-janai/cuprate.git
synced 2024-12-22 19:49:33 +00:00
fix clippy
This commit is contained in:
parent
bf5e863f18
commit
89191ce3bc
3 changed files with 3 additions and 6 deletions
|
@ -9,7 +9,7 @@ use serde::{Deserialize, Deserializer, Serialize};
|
|||
/// Wrapper type for a byte array that (de)serializes from/to hexadecimal strings.
|
||||
///
|
||||
/// ```rust
|
||||
/// # use cuprate_types::hex::Hex;
|
||||
/// # use cuprate_hex::Hex;
|
||||
/// let hash = [1; 32];
|
||||
/// let hex_bytes = Hex::<32>(hash);
|
||||
/// let expected_json = r#""0101010101010101010101010101010101010101010101010101010101010101""#;
|
||||
|
|
|
@ -4,9 +4,6 @@
|
|||
//! however they use more canonical types when appropriate, for example,
|
||||
//! instead of `hash: String`, this module's types would use something like
|
||||
//! `hash: [u8; 32]`.
|
||||
//!
|
||||
//! - TODO: finish making fields canonical after <https://github.com/Cuprate/cuprate/pull/355>
|
||||
//! - TODO: can epee handle `u128`? there are a lot of `(top_64 | low_64)` fields
|
||||
|
||||
mod pool_info;
|
||||
mod pool_info_extent;
|
||||
|
|
|
@ -27,7 +27,7 @@ impl PoolInfoExtent {
|
|||
/// Convert [`Self`] to a [`u8`].
|
||||
///
|
||||
/// ```rust
|
||||
/// use cuprate_rpc_types::misc::PoolInfoExtent as P;
|
||||
/// use cuprate_types::rpc::PoolInfoExtent as P;
|
||||
///
|
||||
/// assert_eq!(P::None.to_u8(), 0);
|
||||
/// assert_eq!(P::Incremental.to_u8(), 1);
|
||||
|
@ -47,7 +47,7 @@ impl PoolInfoExtent {
|
|||
/// This returns [`None`] if `u > 2`.
|
||||
///
|
||||
/// ```rust
|
||||
/// use cuprate_rpc_types::misc::PoolInfoExtent as P;
|
||||
/// use cuprate_types::rpc::PoolInfoExtent as P;
|
||||
///
|
||||
/// assert_eq!(P::from_u8(0), Some(P::None));
|
||||
/// assert_eq!(P::from_u8(1), Some(P::Incremental));
|
||||
|
|
Loading…
Reference in a new issue