Compare commits

...

2 Commits

Author SHA1 Message Date
07c2721307 Update Rust crate tokio to 1.46.0
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2025-07-04 00:08:45 +00:00
3861400145 Fix cargo clippy issues
All checks were successful
continuous-integration/drone/push Build is passing
2025-07-03 08:11:36 +02:00
3 changed files with 19 additions and 6 deletions

17
Cargo.lock generated
View File

@@ -997,6 +997,17 @@ dependencies = [
"hashbrown", "hashbrown",
] ]
[[package]]
name = "io-uring"
version = "0.7.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b86e202f00093dcba4275d4636b93ef9dd75d025ae560d2521b45ea28ab49013"
dependencies = [
"bitflags",
"cfg-if",
"libc",
]
[[package]] [[package]]
name = "is_terminal_polyfill" name = "is_terminal_polyfill"
version = "1.70.1" version = "1.70.1"
@@ -1565,17 +1576,19 @@ dependencies = [
[[package]] [[package]]
name = "tokio" name = "tokio"
version = "1.45.1" version = "1.46.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "75ef51a33ef1da925cea3e4eb122833cb377c61439ca401b770f54902b806779" checksum = "1140bb80481756a8cbe10541f37433b459c5aa1e727b4c020fbfebdc25bf3ec4"
dependencies = [ dependencies = [
"backtrace", "backtrace",
"bytes", "bytes",
"io-uring",
"libc", "libc",
"mio", "mio",
"parking_lot", "parking_lot",
"pin-project-lite", "pin-project-lite",
"signal-hook-registry", "signal-hook-registry",
"slab",
"socket2", "socket2",
"windows-sys 0.52.0", "windows-sys 0.52.0",
] ]

View File

@@ -15,4 +15,4 @@ log = "0.4.27"
env_logger = "0.11.8" env_logger = "0.11.8"
actix-web-httpauth = "0.8.2" actix-web-httpauth = "0.8.2"
askama = "0.14.0" askama = "0.14.0"
tokio = "1.45.1" tokio = "1.46.0"

View File

@@ -102,7 +102,7 @@ struct SendWrapper(mpsc::SyncSender<Vec<u8>>);
impl Write for SendWrapper { impl Write for SendWrapper {
fn write(&mut self, buf: &[u8]) -> std::io::Result<usize> { fn write(&mut self, buf: &[u8]) -> std::io::Result<usize> {
if let Err(e) = self.0.send(buf.to_vec()) { if let Err(e) = self.0.send(buf.to_vec()) {
log::error!("Failed to send a chunk of data! {}", e); log::error!("Failed to send a chunk of data! {e}");
return Err(std::io::Error::other( return Err(std::io::Error::other(
"Failed to send a chunk of data!", "Failed to send a chunk of data!",
)); ));
@@ -127,7 +127,7 @@ impl FileStreamer {
for file in files_list() { for file in files_list() {
let file_path = &file.to_str().unwrap().replace(&ARGS.target_dir, "")[1..]; let file_path = &file.to_str().unwrap().replace(&ARGS.target_dir, "")[1..];
log::debug!("Add {} to archive", file_path); log::debug!("Add {file_path} to archive");
tar.append_file( tar.append_file(
file_path, file_path,
&mut File::open(&file).expect("Failed to open file"), &mut File::open(&file).expect("Failed to open file"),
@@ -149,7 +149,7 @@ impl Stream for FileStreamer {
match self.receive.recv() { match self.receive.recv() {
Ok(d) => Poll::Ready(Some(Ok(Bytes::copy_from_slice(&d)))), Ok(d) => Poll::Ready(Some(Ok(Bytes::copy_from_slice(&d)))),
Err(e) => { Err(e) => {
log::error!("Recv error: {}", e); log::error!("Recv error: {e}");
Poll::Ready(None) Poll::Ready(None)
} }
} }