Compare commits
	
		
			2 Commits
		
	
	
		
			c92734913a
			...
			974d0ed72c
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 974d0ed72c | |||
| 7f749e6c6d | 
							
								
								
									
										2
									
								
								Cargo.lock
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										2
									
								
								Cargo.lock
									
									
									
										generated
									
									
									
								
							| @@ -546,7 +546,7 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" | ||||
|  | ||||
| [[package]] | ||||
| name = "expose-dir-via-http" | ||||
| version = "1.0.0" | ||||
| version = "1.0.1" | ||||
| dependencies = [ | ||||
|  "actix-files", | ||||
|  "actix-web", | ||||
|   | ||||
							
								
								
									
										10
									
								
								Cargo.toml
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								Cargo.toml
									
									
									
									
									
								
							| @@ -1,8 +1,16 @@ | ||||
| [package] | ||||
| name = "expose-dir-via-http" | ||||
| version = "1.0.0" | ||||
| version = "1.0.1" | ||||
| edition = "2021" | ||||
|  | ||||
| [lints.rust] | ||||
| unsafe_code = "forbid" | ||||
|  | ||||
| [lints.clippy] | ||||
| pedantic = "warn" | ||||
| todo = "warn" | ||||
| unwrap_used = "warn" | ||||
|  | ||||
| [dependencies] | ||||
| actix-web = { version = "4", features = ["experimental-io-uring"] } | ||||
| actix-files = "0.6" | ||||
|   | ||||
| @@ -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().unwrap().get()) | ||||
|     .workers(available_parallelism().map_or(1, NonZeroUsize::get)) | ||||
|     .bind(sock)? | ||||
|     .run() | ||||
|     .await | ||||
|   | ||||
		Reference in New Issue
	
	Block a user