diff options
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; |