No description
Find a file
Samuel Collins b33e04900a
All checks were successful
checks / fmt (push) Successful in 23s
checks / Clippy (push) Successful in 32s
checks / Build & Test (push) Successful in 41s
checks / MSRV Build & Test (push) Successful in 42s
Add comprehensive map and set integration tests
2026-04-19 11:18:20 +01:00
.forgejo/workflows add CI checks (#1) 2026-03-28 09:15:59 +00:00
.vscode additional test invariants 2022-09-15 14:36:01 +01:00
src Add comprehensive map and set integration tests 2026-04-19 11:18:20 +01:00
tests Add comprehensive map and set integration tests 2026-04-19 11:18:20 +01:00
.gitignore add CI checks (#1) 2026-03-28 09:15:59 +00:00
Cargo.lock prepare for 0.1.0 release 2026-04-06 14:44:57 +01:00
Cargo.toml prepare for 0.1.0 release 2026-04-06 14:44:57 +01:00
LICENSE-APACHE cargo metadata 2022-09-15 13:09:15 +01:00
LICENSE-MIT cargo metadata 2022-09-15 13:09:15 +01:00
README.md update readme 2026-04-06 14:49:38 +01:00

black-red

A lean, fast red-black tree implementation.

Example

use black_red::RBTreeSet;

let mut tree = RBTreeSet::new();
assert!(tree.is_empty());
assert_eq!(tree.len(), 0);

for i in [5, 3, 7, 9, 6] {
    tree.insert(i);
}

assert_eq!(tree.len(), 5);
assert!(!tree.is_empty());
assert!(tree.contains(&7));
assert!(tree.remove(&7));
assert!(!tree.contains(&7));
assert!(tree.iter().eq(&[3, 5, 6, 9]));