v0.24.7_cleanup_warnings

This commit is contained in:
Mateusz Gruszczyński committed 2026-10-03 10:26:38 +02:00
1 parent 1bfec751d1
commit 579d9c806b
12 files changed
+48 -23

No files matched your search

+6 -4
View File
@@ -638,10 +638,12 @@ impl Cache {
let memory_lease = self.try_reserve_transient(bytes, &settings).unwrap_or_else(|| {
let bytes = bytes as u64;
self.transient_bytes_active.fetch_add(bytes, Ordering::Relaxed);
TransientLease(Arc::new(TransientLeaseInner {
counter: self.transient_bytes_active.clone(),
bytes,
}))
TransientLease {
_inner: Arc::new(TransientLeaseInner {
counter: self.transient_bytes_active.clone(),
bytes,
}),
}
});
ColdDraft {
key,
+6 -4
View File
@@ -137,10 +137,12 @@ impl Cache {
.compare_exchange_weak(current, next, Ordering::AcqRel, Ordering::Relaxed)
.is_ok()
{
return Some(TransientLease(Arc::new(TransientLeaseInner {
counter: self.transient_bytes_active.clone(),
bytes,
})));
return Some(TransientLease {
_inner: Arc::new(TransientLeaseInner {
counter: self.transient_bytes_active.clone(),
bytes,
}),
});
}
}
}
+1 -1
View File
@@ -161,7 +161,7 @@ impl Cache {
.fetch_add(1, Ordering::Relaxed);
return None;
}
let Some(read_lease) = self.try_reserve_transient(entry.body_bytes, settings) else {
let Some(_read_lease) = self.try_reserve_transient(entry.body_bytes, settings) else {
return None;
};
let _cold_read = ByteGaugeGuard::new(&self.cold_read_bytes_active, entry.body_bytes as u64);
+3 -1
View File
@@ -1088,7 +1088,9 @@ impl ColdStore {
}
}
#[derive(Clone)]
struct TransientLease(Arc<TransientLeaseInner>);
struct TransientLease {
_inner: Arc<TransientLeaseInner>,
}
struct TransientLeaseInner {
counter: Arc<AtomicU64>,
-2
View File
@@ -24,7 +24,6 @@ pub fn minify(body: &[u8]) -> Result<Vec<u8>> {
if matches!(ch, '\'' | '"') {
if pending_space && needs_space(last_char, Some(ch)) {
out.push(' ');
last_char = Some(' ');
}
pending_space = false;
quote = Some(ch);
@@ -55,7 +54,6 @@ pub fn minify(body: &[u8]) -> Result<Vec<u8>> {
pending_space = false;
if matches!(ch, '{' | '}' | ':' | ';' | ',' | '>') && last_char == Some(' ') {
out.pop();
last_char = out.chars().last();
}
out.push(ch);
last_char = Some(ch);