mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
chore(primitives): use derive_more where possible (#8834)
This commit is contained in:
@ -89,20 +89,13 @@ criterion_main!(benches);
|
||||
/// adapted to work with `sucds = "0.8.1"`
|
||||
#[allow(unused, unreachable_pub)]
|
||||
mod elias_fano {
|
||||
use derive_more::Deref;
|
||||
use std::{fmt, ops::Deref};
|
||||
use sucds::{mii_sequences::EliasFano, Serializable};
|
||||
|
||||
#[derive(Clone, PartialEq, Eq, Default)]
|
||||
#[derive(Clone, PartialEq, Eq, Default, Deref)]
|
||||
pub struct IntegerList(pub EliasFano);
|
||||
|
||||
impl Deref for IntegerList {
|
||||
type Target = EliasFano;
|
||||
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
|
||||
impl fmt::Debug for IntegerList {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
let vec: Vec<usize> = self.0.iter(0).collect();
|
||||
|
||||
Reference in New Issue
Block a user