From 9ff2358adca561b7723e9c4d79efce87025d2e4e Mon Sep 17 00:00:00 2001 From: metamuffin Date: Fri, 7 Feb 2025 16:21:41 +0100 Subject: clippy --- base/src/cache.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'base/src/cache.rs') diff --git a/base/src/cache.rs b/base/src/cache.rs index e2b540b..d6aa15f 100644 --- a/base/src/cache.rs +++ b/base/src/cache.rs @@ -44,7 +44,7 @@ pub fn cache_location(seed: &[&str]) -> (usize, CachePath) { d.update(b"\0"); } let d = d.finalize(); - let n = d[0] as usize | (d[1] as usize) << 8 | (d[2] as usize) << 16 | (d[3] as usize) << 24; + let n = d[0] as usize | ((d[1] as usize) << 8) | ((d[2] as usize) << 16) | ((d[3] as usize) << 24); let fname = base64::engine::general_purpose::URL_SAFE.encode(d); let fname = &fname[..22]; let fname = format!("{}-{}", seed[0], fname); // about 128 bits @@ -92,7 +92,7 @@ where Ok(location) } -thread_local! { pub static WITHIN_CACHE_FILE: AtomicBool = AtomicBool::new(false); } +thread_local! { pub static WITHIN_CACHE_FILE: AtomicBool = const { AtomicBool::new(false) }; } pub fn cache_file(seed: &[&str], mut generate: Fun) -> Result where -- cgit v1.2.3-70-g09d2