Skip to content

Commit

Permalink
Remove static requirement from get_or_{,try_}insert_with
Browse files Browse the repository at this point in the history
  • Loading branch information
tinou98 committed Dec 10, 2021
1 parent 9ec9c2b commit bd5e37b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/future/cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ where
///
pub async fn get_or_insert_with<F>(&self, key: K, init: F) -> V
where
F: Future<Output = V> + Send + 'static,
F: Future<Output = V> + Send,
{
let hash = self.base.hash(&key);
let key = Arc::new(key);
Expand Down Expand Up @@ -453,7 +453,7 @@ where
///
pub async fn get_or_try_insert_with<F, E>(&self, key: K, init: F) -> Result<V, Arc<E>>
where
F: Future<Output = Result<V, E>> + Send + 'static,
F: Future<Output = Result<V, E>> + Send,
E: Send + Sync + 'static,
{
let hash = self.base.hash(&key);
Expand Down

0 comments on commit bd5e37b

Please sign in to comment.