aboutsummaryrefslogtreecommitdiff
path: root/cache/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'cache/src/lib.rs')
-rw-r--r--cache/src/lib.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/cache/src/lib.rs b/cache/src/lib.rs
index 52245d6..115741c 100644
--- a/cache/src/lib.rs
+++ b/cache/src/lib.rs
@@ -127,10 +127,10 @@ thread_local! { pub static WITHIN_CACHE_FILE: AtomicBool = const { AtomicBool::n
pub fn cache_file<Fun>(
kind: &str,
key: impl Hash,
- mut generate: Fun,
+ generate: Fun,
) -> Result<CachePath, anyhow::Error>
where
- Fun: FnMut(std::fs::File) -> Result<(), anyhow::Error>,
+ Fun: FnOnce(std::fs::File) -> Result<(), anyhow::Error>,
{
let (bucket, location) = cache_location(kind, key);
let loc_abs = location.abs();