chore(primitives): use derive_more where possible (#8834)

This commit is contained in:
Alexey Shekhirin
2024-06-14 15:06:03 +01:00
committed by GitHub
parent 3af5bd857e
commit ca574edbc8
9 changed files with 58 additions and 208 deletions

View File

@ -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();