Remove unnecessary async keyword
This commit is contained in:
parent
b41ae8cb79
commit
afb02db7b7
2 changed files with 3 additions and 3 deletions
2
src/cache/mem.rs
vendored
2
src/cache/mem.rs
vendored
|
@ -83,7 +83,7 @@ where
|
||||||
MemoryCacheImpl: 'static + InternalMemoryCache,
|
MemoryCacheImpl: 'static + InternalMemoryCache,
|
||||||
ColdCache: 'static + Cache,
|
ColdCache: 'static + Cache,
|
||||||
{
|
{
|
||||||
pub async fn new(inner: ColdCache, max_mem_size: crate::units::Bytes) -> Arc<Self> {
|
pub fn new(inner: ColdCache, max_mem_size: crate::units::Bytes) -> Arc<Self> {
|
||||||
let (tx, rx) = channel(100);
|
let (tx, rx) = channel(100);
|
||||||
let new_self = Arc::new(Self {
|
let new_self = Arc::new(Self {
|
||||||
inner,
|
inner,
|
||||||
|
|
|
@ -172,8 +172,8 @@ async fn main() -> Result<(), Box<dyn Error>> {
|
||||||
let cache = DiskCache::new(disk_quota.into(), cache_path.clone()).await;
|
let cache = DiskCache::new(disk_quota.into(), cache_path.clone()).await;
|
||||||
let cache: Arc<dyn Cache> = match cache_type {
|
let cache: Arc<dyn Cache> = match cache_type {
|
||||||
CacheType::OnDisk => cache,
|
CacheType::OnDisk => cache,
|
||||||
CacheType::Lru => MemoryCache::<Lfu, _>::new(cache, memory_max_size).await,
|
CacheType::Lru => MemoryCache::<Lfu, _>::new(cache, memory_max_size),
|
||||||
CacheType::Lfu => MemoryCache::<Lru, _>::new(cache, memory_max_size).await,
|
CacheType::Lfu => MemoryCache::<Lru, _>::new(cache, memory_max_size),
|
||||||
};
|
};
|
||||||
|
|
||||||
let cache_0 = Arc::clone(&cache);
|
let cache_0 = Arc::clone(&cache);
|
||||||
|
|
Loading…
Reference in a new issue