Skip to content

Commit

Permalink
added Len trait and several utils relating to it; advance_by...
Browse files Browse the repository at this point in the history
  • Loading branch information
ngtkana committed Oct 17, 2023
1 parent 494e409 commit d716643
Show file tree
Hide file tree
Showing 2 changed files with 265 additions and 59 deletions.
5 changes: 5 additions & 0 deletions libs/rb/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ trait Callback: Sized {
fn update(node: Ptr<Self>);
}

/// A trait for getting the length of a node in a red-black tree.
trait Len {
fn len(&self) -> usize;
}

/// A node in a red-black tree.
#[allow(dead_code)]
struct Node<C: Callback> {
Expand Down
Loading

0 comments on commit d716643

Please sign in to comment.