diff options
author | metamuffin <metamuffin@disroot.org> | 2024-03-18 10:46:39 +0100 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2024-03-18 10:46:39 +0100 |
commit | 7d410d53274fdd6840261c286bc2785222256436 (patch) | |
tree | 807ac6f960f4c8c9d026111311ec8d8490002157 /client-native-rift | |
parent | 0825cb66e63a0af09f0c0945542d412091010f73 (diff) | |
download | keks-meet-7d410d53274fdd6840261c286bc2785222256436.tar keks-meet-7d410d53274fdd6840261c286bc2785222256436.tar.bz2 keks-meet-7d410d53274fdd6840261c286bc2785222256436.tar.zst |
clippy
Diffstat (limited to 'client-native-rift')
-rw-r--r-- | client-native-rift/src/file.rs | 6 | ||||
-rw-r--r-- | client-native-rift/src/main.rs | 2 |
2 files changed, 3 insertions, 5 deletions
diff --git a/client-native-rift/src/file.rs b/client-native-rift/src/file.rs index 93dde62..a988595 100644 --- a/client-native-rift/src/file.rs +++ b/client-native-rift/src/file.rs @@ -126,11 +126,10 @@ impl RequestHandler for DownloadHandler { .label .clone() .unwrap_or("download".to_owned()) - .replace("/", "_") + .replace('/', "_") .replace("..", "_") .into() }); - if path.exists() {} Box::pin(async move { let pos = Arc::new(AtomicUsize::new(0)); let writer: Arc<RwLock<Option<Pin<Box<dyn AsyncWrite + Send + Sync>>>>> = @@ -178,9 +177,8 @@ impl RequestHandler for DownloadHandler { let writer = writer.clone(); let pos = pos.clone(); Box::pin(async move { - // TODO if mesg.is_string { - let s = String::from_utf8((&mesg.data).to_vec()).unwrap(); + let s = String::from_utf8(mesg.data.to_vec()).unwrap(); if &s == "end" { info!("transfer complete") } diff --git a/client-native-rift/src/main.rs b/client-native-rift/src/main.rs index fad4bb7..40b9aab 100644 --- a/client-native-rift/src/main.rs +++ b/client-native-rift/src/main.rs @@ -3,7 +3,7 @@ which is licensed under the GNU Affero General Public License (version 3); see /COPYING. Copyright (C) 2023 metamuffin <metamuffin.org> */ - +#![allow(clippy::type_complexity)] pub mod file; pub mod port; |