Compare commits

..

2 Commits

Author SHA1 Message Date
ddidderr 504d10bccc b 2024-04-11 10:36:34 +02:00
ddidderr d9ac349d58 a 2024-04-11 10:36:22 +02:00
5 changed files with 308 additions and 288 deletions
Generated
+305 -277
View File
File diff suppressed because it is too large Load Diff
+1 -9
View File
@@ -1,16 +1,8 @@
[package]
name = "expose-dir-via-http"
version = "1.0.28"
version = "1.0.0"
edition = "2021"
[lints.rust]
unsafe_code = "forbid"
[lints.clippy]
pedantic = { level = "warn", priority = -1 }
todo = "warn"
unwrap_used = "warn"
[dependencies]
actix-web = { version = "4", features = ["experimental-io-uring"] }
actix-files = "0.6"
View File
View File
+2 -2
View File
@@ -1,6 +1,6 @@
use std::{
env,
net::{IpAddr, SocketAddr},
num::NonZeroUsize,
thread::available_parallelism,
};
@@ -39,7 +39,7 @@ async fn main() -> std::io::Result<()> {
.prefer_utf8(true),
)
})
.workers(available_parallelism().map_or(1, NonZeroUsize::get))
.workers(available_parallelism().unwrap().get())
.bind(sock)?
.run()
.await