From de75ff52e2862701d2298d438dcc0f742cf9c893 Mon Sep 17 00:00:00 2001 From: Edward Shen Date: Fri, 9 Apr 2021 22:02:08 -0400 Subject: [PATCH] pedantic clippy --- src/fs.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/fs.rs b/src/fs.rs index f9568b1..91d9fb5 100644 --- a/src/fs.rs +++ b/src/fs.rs @@ -23,7 +23,7 @@ pub async fn transparent_file_stream( mut byte_stream: impl Stream> + Unpin + Send + 'static, ) -> Result>, std::io::Error> { if let Some(arc) = WRITING_STATUS.read().get(path) { - FromFsStream::new(path, Arc::clone(&arc)).await + FromFsStream::new(path, Arc::clone(arc)).await } else { let done_writing_flag = Arc::new(CacheStatus::new()); @@ -121,7 +121,7 @@ struct CacheStatus(AtomicU8); impl CacheStatus { #[inline] - fn new() -> Self { + const fn new() -> Self { Self(AtomicU8::new(WritingStatus::NotDone as u8)) }