Compare commits

..

2 Commits

Author SHA1 Message Date
504d10bccc b 2024-04-11 10:36:34 +02:00
d9ac349d58 a 2024-04-11 10:36:22 +02:00
5 changed files with 308 additions and 288 deletions

582
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -1,16 +1,8 @@
[package]
name = "expose-dir-via-http"
version = "1.0.31"
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"

0
a Normal file
View File

0
b Normal file
View File

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