fix lints
This commit is contained in:
parent
1554233e12
commit
5c0517d131
|
|
@ -5,7 +5,7 @@ use std::{
|
||||||
|
|
||||||
use atomic_time::AtomicSystemTime;
|
use atomic_time::AtomicSystemTime;
|
||||||
use bytes::Bytes;
|
use bytes::Bytes;
|
||||||
use dashmap::{mapref::one::Ref, DashMap};
|
use dashmap::{DashMap, mapref::one::Ref};
|
||||||
use tokio::time;
|
use tokio::time;
|
||||||
|
|
||||||
use crate::config;
|
use crate::config;
|
||||||
|
|
@ -169,7 +169,7 @@ impl Cache {
|
||||||
///
|
///
|
||||||
/// It exists so we can run the expiry check before
|
/// It exists so we can run the expiry check before
|
||||||
/// actually working with any entries, so no weird bugs happen
|
/// actually working with any entries, so no weird bugs happen
|
||||||
fn get_(&self, key: &str) -> Option<Ref<String, Entry>> {
|
fn get_(&self, key: &str) -> Option<Ref<'_, String, Entry>> {
|
||||||
let e = self.map.get(key)?;
|
let e = self.map.get(key)?;
|
||||||
|
|
||||||
// if the entry is expired get rid of it now
|
// if the entry is expired get rid of it now
|
||||||
|
|
|
||||||
|
|
@ -289,8 +289,6 @@ impl Engine {
|
||||||
|
|
||||||
let len = full_data.len() as u64;
|
let len = full_data.len() as u64;
|
||||||
|
|
||||||
tracing::info!("data len is {}", data.len());
|
|
||||||
|
|
||||||
(data, len)
|
(data, len)
|
||||||
} else {
|
} else {
|
||||||
// not in cache, so try disk
|
// not in cache, so try disk
|
||||||
|
|
@ -409,12 +407,10 @@ impl Engine {
|
||||||
|
|
||||||
// if we have an i/o task, send it off
|
// if we have an i/o task, send it off
|
||||||
// also cloning this is okay because it's a Bytes
|
// also cloning this is okay because it's a Bytes
|
||||||
if !coalesce_and_strip {
|
if !coalesce_and_strip && let Some(ref tx) = tx {
|
||||||
if let Some(ref tx) = tx {
|
debug!("sending chunk to i/o task");
|
||||||
debug!("sending chunk to i/o task");
|
tx.send(chunk.clone())
|
||||||
tx.send(chunk.clone())
|
.wrap_err("failed to send chunk to i/o task!")?;
|
||||||
.wrap_err("failed to send chunk to i/o task!")?;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// add to sample if we need to
|
// add to sample if we need to
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue