Compare commits

..

24 Commits

Author SHA1 Message Date
5e84119f51 Merge pull request 'Update Rust crate clap to 4.5.41' () from renovate/clap-4.x into master 2025-07-10 00:47:05 +00:00
373ecd3efe Update Rust crate clap to 4.5.41 2025-07-10 00:15:43 +00:00
7441ee5afe Merge pull request 'Update Rust crate tokio to 1.46.1' () from renovate/tokio-1.x into master 2025-07-05 00:42:31 +00:00
3dedcc4487 Update Rust crate tokio to 1.46.1 2025-07-05 00:08:50 +00:00
07c2721307 Update Rust crate tokio to 1.46.0 2025-07-04 00:08:45 +00:00
3861400145 Fix cargo clippy issues 2025-07-03 08:11:36 +02:00
0e263b211f Update Rust crate clap to 4.5.40 2025-06-10 00:21:54 +00:00
4444860f9b Update Rust crate tokio to 1.45.1 2025-06-09 00:21:35 +00:00
b5eac1ed2f Update Rust crate clap to 4.5.39 2025-06-07 00:21:02 +00:00
ea23904be6 Fix cargo clippy issue 2025-06-06 06:12:22 +00:00
75f54d2e94 Update Rust crate actix-web to 4.11.0 2025-05-13 00:16:31 +00:00
f50697dfab Update Rust crate clap to 4.5.38 2025-05-12 00:16:00 +00:00
bfb33a22ca Update Rust crate tokio to 1.45.0 2025-05-07 00:24:16 +00:00
0b0d6f0973 Update Rust crate askama to 0.14.0 2025-04-24 00:19:15 +00:00
1f046f83b3 Update Rust crate clap to 4.5.37 2025-04-19 00:27:05 +00:00
e8cf795c3e Update Rust crate askama to 0.13.1 2025-04-16 00:26:29 +00:00
a9b7f57c32 Update Rust crate clap to 4.5.36 2025-04-12 00:26:51 +00:00
41076a2ff1 Update Rust crate tokio to 1.44.2 2025-04-08 00:26:56 +00:00
4765628283 Update Rust crate tar to 0.4.44 2025-04-07 00:32:52 +00:00
dee721b462 Update Rust crate log to 0.4.27 2025-04-06 00:33:25 +00:00
c4a1646702 Update Rust crate lazy_static to 1.5.0 2025-04-05 00:33:12 +00:00
2e64a112a2 Update Rust crate env_logger to 0.11.8 2025-04-04 00:33:57 +00:00
3da08d7c5f Update Rust crate clap to 4.5.35 2025-04-03 00:33:44 +00:00
5015f670ad Update Rust crate actix to 0.13.5 2025-04-02 00:33:48 +00:00
3 changed files with 53 additions and 41 deletions

65
Cargo.lock generated

@ -46,9 +46,9 @@ dependencies = [
[[package]] [[package]]
name = "actix-http" name = "actix-http"
version = "3.10.0" version = "3.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0fa882656b67966045e4152c634051e70346939fced7117d5f0b52146a7c74c9" checksum = "44dfe5c9e0004c623edc65391dfd51daa201e7e30ebd9c9bedf873048ec32bc2"
dependencies = [ dependencies = [
"actix-codec", "actix-codec",
"actix-rt", "actix-rt",
@ -120,9 +120,9 @@ dependencies = [
[[package]] [[package]]
name = "actix-server" name = "actix-server"
version = "2.5.1" version = "2.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6398974fd4284f4768af07965701efbbb5fdc0616bff20cade1bb14b77675e24" checksum = "a65064ea4a457eaf07f2fba30b4c695bf43b721790e9530d26cb6f9019ff7502"
dependencies = [ dependencies = [
"actix-rt", "actix-rt",
"actix-service", "actix-service",
@ -157,9 +157,9 @@ dependencies = [
[[package]] [[package]]
name = "actix-web" name = "actix-web"
version = "4.10.2" version = "4.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f2e3b15b3dc6c6ed996e4032389e9849d4ab002b1e92fbfe85b5f307d1479b4d" checksum = "a597b77b5c6d6a1e1097fddde329a83665e25c5437c696a3a9a4aa514a614dea"
dependencies = [ dependencies = [
"actix-codec", "actix-codec",
"actix-http", "actix-http",
@ -327,9 +327,9 @@ dependencies = [
[[package]] [[package]]
name = "askama" name = "askama"
version = "0.13.0" version = "0.14.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9a4e46abb203e00ef226442d452769233142bbfdd79c3941e84c8e61c4112543" checksum = "f75363874b771be265f4ffe307ca705ef6f3baa19011c149da8674a87f1b75c4"
dependencies = [ dependencies = [
"askama_derive", "askama_derive",
"itoa", "itoa",
@ -340,9 +340,9 @@ dependencies = [
[[package]] [[package]]
name = "askama_derive" name = "askama_derive"
version = "0.13.0" version = "0.14.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "54398906821fd32c728135f7b351f0c7494ab95ae421d41b6f5a020e158f28a6" checksum = "129397200fe83088e8a68407a8e2b1f826cf0086b21ccdb866a722c8bcd3a94f"
dependencies = [ dependencies = [
"askama_parser", "askama_parser",
"basic-toml", "basic-toml",
@ -357,9 +357,9 @@ dependencies = [
[[package]] [[package]]
name = "askama_parser" name = "askama_parser"
version = "0.13.0" version = "0.14.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cf315ce6524c857bb129ff794935cf6d42c82a6cff60526fe2a63593de4d0d4f" checksum = "d6ab5630b3d5eaf232620167977f95eb51f3432fc76852328774afbd242d4358"
dependencies = [ dependencies = [
"memchr", "memchr",
"serde", "serde",
@ -420,9 +420,9 @@ dependencies = [
[[package]] [[package]]
name = "brotli" name = "brotli"
version = "7.0.0" version = "8.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cc97b8f16f944bba54f0433f07e30be199b6dc2bd25937444bbad560bcea29bd" checksum = "9991eea70ea4f293524138648e41ee89b0b2b12ddef3b255effa43c8056e0e0d"
dependencies = [ dependencies = [
"alloc-no-stdlib", "alloc-no-stdlib",
"alloc-stdlib", "alloc-stdlib",
@ -431,9 +431,9 @@ dependencies = [
[[package]] [[package]]
name = "brotli-decompressor" name = "brotli-decompressor"
version = "4.0.2" version = "5.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "74fa05ad7d803d413eb8380983b092cbbaf9a85f151b871360e7b00cd7060b37" checksum = "874bb8112abecc98cbd6d81ea4fa7e94fb9449648c93cc89aa40c81c24d7de03"
dependencies = [ dependencies = [
"alloc-no-stdlib", "alloc-no-stdlib",
"alloc-stdlib", "alloc-stdlib",
@ -473,9 +473,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
[[package]] [[package]]
name = "clap" name = "clap"
version = "4.5.35" version = "4.5.41"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d8aa86934b44c19c50f87cc2790e19f54f7a67aedb64101c2e1a2e5ecfb73944" checksum = "be92d32e80243a54711e5d7ce823c35c41c9d929dc4ab58e1276f625841aadf9"
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.35" version = "4.5.41"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2414dbb2dd0695280da6ea9261e327479e9d37b0630f6b53ba2a11c60c679fd9" checksum = "707eab41e9622f9139419d573eca0900137718000c517d47da73045f54331c3d"
dependencies = [ dependencies = [
"anstream", "anstream",
"anstyle", "anstyle",
@ -495,9 +495,9 @@ dependencies = [
[[package]] [[package]]
name = "clap_derive" name = "clap_derive"
version = "4.5.32" version = "4.5.41"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "09176aae279615badda0765c0c0b3f6ed53f4709118af73cf4655d85d1530cd7" checksum = "ef4f52386a59ca4c860f7393bcf8abd8dfd91ecccc0f774635ff68e92eeef491"
dependencies = [ dependencies = [
"heck", "heck",
"proc-macro2", "proc-macro2",
@ -643,9 +643,9 @@ dependencies = [
[[package]] [[package]]
name = "env_logger" name = "env_logger"
version = "0.11.7" version = "0.11.8"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c3716d7a920fb4fac5d84e9d4bce8ceb321e9414b4409da61b07b75c1e3d0697" checksum = "13c863f0904021b108aa8b2f55046443e6b1ebde8fd4a15c399893aae4fa069f"
dependencies = [ dependencies = [
"anstream", "anstream",
"anstyle", "anstyle",
@ -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.44.1" version = "1.46.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f382da615b842244d4b8738c82ed1275e6c5dd90c459a30941cd07080b06c91a" checksum = "0cc3a2344dafbe23a245241fe8b09735b521110d30fcefbbd5feb1797ca35d17"
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",
] ]

@ -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.35", features = ["derive", "env"] } clap = { version = "4.5.41", features = ["derive", "env"] }
tar = "0.4.38" tar = "0.4.44"
actix-web = "4.10.2" actix-web = "4.11.0"
actix = "0.13.0" actix = "0.13.5"
lazy_static = "1.4.0" lazy_static = "1.5.0"
log = "0.4.17" log = "0.4.27"
env_logger = "0.11.7" env_logger = "0.11.8"
actix-web-httpauth = "0.8.2" actix-web-httpauth = "0.8.2"
askama = "0.13.0" askama = "0.14.0"
tokio = "1.23.0" tokio = "1.46.1"

@ -1,5 +1,5 @@
use std::fs::File; use std::fs::File;
use std::io::{ErrorKind, Write}; use std::io::Write;
use std::path::{Path, PathBuf}; use std::path::{Path, PathBuf};
use std::pin::Pin; use std::pin::Pin;
use std::sync::mpsc; use std::sync::mpsc;
@ -102,9 +102,8 @@ 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::new( return Err(std::io::Error::other(
ErrorKind::Other,
"Failed to send a chunk of data!", "Failed to send a chunk of data!",
)); ));
} }
@ -128,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"),
@ -150,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)
} }
} }