Compare commits

..

1 Commits

Author SHA1 Message Date
336baab973 Update Rust crate tokio to 1.45.1
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
2025-06-07 00:21:04 +00:00
3 changed files with 22 additions and 45 deletions

55
Cargo.lock generated
View File

@@ -130,7 +130,7 @@ dependencies = [
"futures-core", "futures-core",
"futures-util", "futures-util",
"mio", "mio",
"socket2 0.5.9", "socket2",
"tokio", "tokio",
"tracing", "tracing",
] ]
@@ -192,7 +192,7 @@ dependencies = [
"serde_json", "serde_json",
"serde_urlencoded", "serde_urlencoded",
"smallvec", "smallvec",
"socket2 0.5.9", "socket2",
"time", "time",
"tracing", "tracing",
"url", "url",
@@ -473,9 +473,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
[[package]] [[package]]
name = "clap" name = "clap"
version = "4.5.48" version = "4.5.38"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e2134bb3ea021b78629caa971416385309e0131b351b25e01dc16fb54e1b5fae" checksum = "ed93b9805f8ba930df42c2590f05453d5ec36cbb85d018868a5b24d31f6ac000"
dependencies = [ dependencies = [
"clap_builder", "clap_builder",
"clap_derive", "clap_derive",
@@ -483,9 +483,9 @@ dependencies = [
[[package]] [[package]]
name = "clap_builder" name = "clap_builder"
version = "4.5.48" version = "4.5.38"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c2ba64afa3c0a6df7fa517765e31314e983f51dda798ffba27b988194fb65dc9" checksum = "379026ff283facf611b0ea629334361c4211d1b12ee01024eec1591133b04120"
dependencies = [ dependencies = [
"anstream", "anstream",
"anstyle", "anstyle",
@@ -495,9 +495,9 @@ dependencies = [
[[package]] [[package]]
name = "clap_derive" name = "clap_derive"
version = "4.5.47" version = "4.5.32"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bbfd7eae0b0f1a6e63d4b13c9c478de77c2eb546fba158ad50b4203dc24b9f9c" checksum = "09176aae279615badda0765c0c0b3f6ed53f4709118af73cf4655d85d1530cd7"
dependencies = [ dependencies = [
"heck", "heck",
"proc-macro2", "proc-macro2",
@@ -997,17 +997,6 @@ 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"
@@ -1067,9 +1056,9 @@ checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe"
[[package]] [[package]]
name = "libc" name = "libc"
version = "0.2.174" version = "0.2.171"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1171693293099992e19cddea4e8b849964e9846f4acee11b3948bcc337be8776" checksum = "c19937216e9d3aa9956d9bb8dfc0b0c8beb6058fc4f7a4dc4d850edf86a237d6"
[[package]] [[package]]
name = "libredox" name = "libredox"
@@ -1123,9 +1112,9 @@ dependencies = [
[[package]] [[package]]
name = "log" name = "log"
version = "0.4.28" version = "0.4.27"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "34080505efa8e45a4b816c349525ebe327ceaa8559756f0356cba97ef3bf7432" checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94"
[[package]] [[package]]
name = "memchr" name = "memchr"
@@ -1488,16 +1477,6 @@ dependencies = [
"windows-sys 0.52.0", "windows-sys 0.52.0",
] ]
[[package]]
name = "socket2"
version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "233504af464074f9d066d7b5416c5f9b894a5862a6506e306f7b816cdd6f1807"
dependencies = [
"libc",
"windows-sys 0.59.0",
]
[[package]] [[package]]
name = "stable_deref_trait" name = "stable_deref_trait"
version = "1.2.0" version = "1.2.0"
@@ -1586,21 +1565,19 @@ dependencies = [
[[package]] [[package]]
name = "tokio" name = "tokio"
version = "1.47.1" version = "1.45.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "89e49afdadebb872d3145a5638b59eb0691ea23e46ca484037cfab3b76b95038" checksum = "75ef51a33ef1da925cea3e4eb122833cb377c61439ca401b770f54902b806779"
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 0.6.0", "windows-sys 0.52.0",
"windows-sys 0.59.0",
] ]
[[package]] [[package]]

View File

@@ -6,13 +6,13 @@ edition = "2024"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies] [dependencies]
clap = { version = "4.5.48", features = ["derive", "env"] } clap = { version = "4.5.38", features = ["derive", "env"] }
tar = "0.4.44" tar = "0.4.44"
actix-web = "4.11.0" actix-web = "4.11.0"
actix = "0.13.5" actix = "0.13.5"
lazy_static = "1.5.0" lazy_static = "1.5.0"
log = "0.4.28" 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.47.1" tokio = "1.45.1"

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 {file_path} to archive"); log::debug!("Add {} to archive", file_path);
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)
} }
} }