Skip to content
Open
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
12 changes: 12 additions & 0 deletions src/unify/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -570,6 +570,18 @@ where
let id = self.inlined_get_root_key(id);
self.value(id).value.clone()
}

// An always-inlined version of `probe_value`, for hot callsites.
// And returns the root key of the given key along with the value.
#[inline(always)]
pub fn inlined_probe_key_value<K1>(&mut self, id: K1) -> (K, V)
where
K1: Into<K>,
{
let id = id.into();
let id = self.inlined_get_root_key(id);
(id, self.value(id).value.clone())
}
}

///////////////////////////////////////////////////////////////////////////
Expand Down