From f171051d54bc3125eed81964feb4bc1cb4d743f3 Mon Sep 17 00:00:00 2001 From: G2-Games Date: Tue, 25 Feb 2025 11:31:59 -0600 Subject: [PATCH] Updated deps, changed writer to maybe block less --- confetti-box/Cargo.toml | 4 ++-- confetti-box/src/database.rs | 2 +- confetti-box/src/lib.rs | 1 - 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/confetti-box/Cargo.toml b/confetti-box/Cargo.toml index 52e8ec9..9765646 100644 --- a/confetti-box/Cargo.toml +++ b/confetti-box/Cargo.toml @@ -1,10 +1,10 @@ [package] name = "confetti_box" -version = "0.2.0" +version = "0.2.1" repository = "https://github.com/Dangoware/confetti-box" license = "AGPL-3.0-or-later" authors.workspace = true -edition = "2021" +edition = "2024" [lints] workspace = true diff --git a/confetti-box/src/database.rs b/confetti-box/src/database.rs index 9dda827..f986997 100644 --- a/confetti-box/src/database.rs +++ b/confetti-box/src/database.rs @@ -377,7 +377,7 @@ impl Chunkbase { } pub fn get_file(&self, uuid: &Uuid) -> Option<&(DateTime, ChunkedInfo)> { - self.chunks.get(&uuid) + self.chunks.get(uuid) } pub fn remove_file(&mut self, uuid: &Uuid) -> Result { diff --git a/confetti-box/src/lib.rs b/confetti-box/src/lib.rs index 7a4e1c4..338a700 100644 --- a/confetti-box/src/lib.rs +++ b/confetti-box/src/lib.rs @@ -309,7 +309,6 @@ pub async fn websocket_upload( stream.send(rocket_ws::Message::Text(json::serde_json::ser::to_string(&offset).unwrap())).await.unwrap(); file.write_all(&message).await.unwrap(); - file.flush().await?; chunk_db.write().unwrap().extend_timeout(&uuid, TimeDelta::seconds(30)); }