Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/controllers/apotheosis.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,11 @@ where
pub fn insert(&mut self, item: R) -> bool {
let radix_key = item.search_id().to_radix_key();

// A radix node can exist without holding a value: splitting the tree on a
// shared prefix creates internal nodes whose `data` is None. Only a node
// that actually holds an index is a real duplicate.
if let Some(ref key) = radix_key
&& self.radix.find(key).is_some()
&& self.radix.find(key).is_some_and(|node| node.data.is_some())
{
tracing::warn!("Key already exists in radix tree: {:?}", key);
return false;
Expand Down
Loading