File tree Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -64,14 +64,11 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
64
64
} ;
65
65
let threads = dotenv:: var ( "SERVER_THREADS" )
66
66
. map ( |s| s. parse ( ) . expect ( "SERVER_THREADS was not a valid number" ) )
67
- . unwrap_or_else ( |_| {
68
- if env == Env :: Development {
69
- 5
70
- } else {
71
- // A large default because this can be easily changed via env and in production we
72
- // want the logging middleware to accurately record the start time.
73
- 500
74
- }
67
+ . unwrap_or_else ( |_| match env {
68
+ Env :: Development => 5 ,
69
+ // A large default because this can be easily changed via env and in production we
70
+ // want the logging middleware to accurately record the start time.
71
+ _ => 500 ,
75
72
} ) ;
76
73
77
74
println ! ( "Booting with a hyper based server" ) ;
You can’t perform that action at this time.
0 commit comments