Skip to content

Commit

Permalink
Remove unused function in gossipsub time_cache
Browse files Browse the repository at this point in the history
  • Loading branch information
StemCll committed Oct 2, 2023
1 parent 8cc131d commit 1ad6e36
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions protocols/gossipsub/src/time_cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,6 @@ impl<'a, K: 'a, V: 'a> Entry<'a, K, V>
where
K: Eq + std::hash::Hash + Clone,
{
pub(crate) fn or_insert_with<F: FnOnce() -> V>(self, default: F) -> &'a mut V {
match self {
Entry::Occupied(entry) => entry.into_mut(),
Entry::Vacant(entry) => entry.insert(default()),
}
}
pub(crate) fn or_default(self) -> &'a mut V
where
V: Default,
Expand Down

0 comments on commit 1ad6e36

Please sign in to comment.