diff --git a/src/main.rs b/src/main.rs index e98688f..23b3243 100644 --- a/src/main.rs +++ b/src/main.rs @@ -30,10 +30,9 @@ fn main() -> Result<()> { &argument.password, )?)?; - let listener = { - println!("[{}] [info] Server started on {}", now(), argument.bind); - TcpListener::bind(&argument.bind)? - }; + let listener = TcpListener::bind(&argument.bind)?; + + println!("[{}] [info] Server started on {}", now(), argument.bind); for stream in listener.incoming() { match stream { @@ -188,7 +187,6 @@ fn titan( } Ok(read) => { total += read; - // validate server-side limits if argument.size.is_some_and(|limit| total > limit) { if let Err(e) = tmp.delete() { @@ -226,7 +224,6 @@ fn titan( }, ); } - // begin chunk recording into the temporary file match tmp.file.write(&input[..read]) { Ok(write) => {