Skip to content

Commit dd47c53

Browse files
committed
fix: relax trait bounds for get_shallow and revalidate
since these methods don't use `get_or_create(key)`
1 parent 6339b80 commit dd47c53

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ impl<F: Fetcher, R: Runtime> SWR<F, R> {
312312
where
313313
T: DeserializeOwned + Send + Sync + 'static,
314314
K: Hash + Eq + ?Sized,
315-
F::Key: Borrow<K> + for<'k> From<&'k K>
315+
F::Key: Borrow<K>
316316
{
317317
self.inner
318318
.cache
@@ -326,7 +326,7 @@ impl<F: Fetcher, R: Runtime> SWR<F, R> {
326326
pub fn revalidate<K>(&self, key: &K)
327327
where
328328
K: Hash + Eq + ?Sized,
329-
F::Key: Borrow<K> + for<'k> From<&'k K>
329+
F::Key: Borrow<K>
330330
{
331331
if let Some(slot) = self.inner.cache.get(key) {
332332
self.inner.revalidate(slot);

0 commit comments

Comments
 (0)