Skip to content

Commit

Permalink
fix: comment
Browse files Browse the repository at this point in the history
  • Loading branch information
PureWhiteWu committed Aug 16, 2023
1 parent df34f29 commit 0af8a81
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ where
K: Eq + Hash + Clone,
V: Clone,
{
/// Create a new cache with the given capacity and time-to-live (TTL) for values.
/// Create a new cache with the given capacity.
pub fn new(capacity: usize) -> Self {
Self {
map: DashMap::with_capacity_and_hasher(capacity, ahash::RandomState::new()),
Expand All @@ -192,7 +192,7 @@ where
self.capacity
}

/// Get the value associated with the given key, if it exists and is not expired.
/// Get the value associated with the given key.
pub fn get(&self, key: &K) -> Option<V> {
self.map.get(&key).map(|v| v.value().clone())
}
Expand Down

0 comments on commit 0af8a81

Please sign in to comment.