From ab7b7295ca9e037864b903631c8d56fbc6261df6 Mon Sep 17 00:00:00 2001 From: Joscha Date: Tue, 31 Dec 2024 15:13:17 +0100 Subject: [PATCH] Remove unused code --- brood/src/data.rs | 2 -- brood/src/graph.rs | 6 ------ brood/src/util.rs | 4 ++-- 3 files changed, 2 insertions(+), 10 deletions(-) diff --git a/brood/src/data.rs b/brood/src/data.rs index 2c3213c..091354b 100644 --- a/brood/src/data.rs +++ b/brood/src/data.rs @@ -31,8 +31,6 @@ impl Link { } } -struct Store<'a, W>(&'a mut W); - fn write_u8(w: &mut impl Write, n: u8) -> io::Result<()> { w.write_all(&n.to_le_bytes()) } diff --git a/brood/src/graph.rs b/brood/src/graph.rs index ed6f559..95c53e1 100644 --- a/brood/src/graph.rs +++ b/brood/src/graph.rs @@ -89,8 +89,6 @@ impl SubAssign for NodeIdx { pub struct EdgeIdx(pub u32); impl EdgeIdx { - pub const NONE: Self = Self(u32::MAX); - #[inline] pub const fn new(value: usize) -> Self { Self(value as u32) @@ -185,10 +183,6 @@ pub struct Graph { } impl Graph { - pub fn new() -> Self { - Self::default() - } - pub fn with_capacity(nodes: usize, edges: usize) -> Self { Self { nodes: Vec::with_capacity(nodes), diff --git a/brood/src/util.rs b/brood/src/util.rs index 2a8f1d0..cb5ef33 100644 --- a/brood/src/util.rs +++ b/brood/src/util.rs @@ -1,11 +1,11 @@ -use std::{fmt, iter, thread::panicking, time::Instant}; +use std::{fmt, time::Instant}; use regex::Regex; use thousands::Separable; use crate::{ data::{Data, Page}, - graph::{Graph, NodeIdx}, + graph::NodeIdx, }; pub struct Counter {