diff --git a/src/main.rs b/src/main.rs index 7d5214b..ac41701 100644 --- a/src/main.rs +++ b/src/main.rs @@ -6,7 +6,7 @@ use tsr::{ use chrono::{DateTime, Utc}; use clap::Parser; use mime::Mime; -use std::{collections::HashMap, env, error::Error, ops::Deref, path::Path}; +use std::{collections::HashMap, env, error::Error, io, ops::Deref, path::Path}; #[cfg(feature = "log")] use log::log; @@ -84,7 +84,7 @@ impl<'a> Response<'a> { } } -async fn handle_connection(mut stream: TcpStream) -> Result<(i32, String), Box> { +async fn handle_connection(mut stream: TcpStream) -> io::Result<(i32, String)> { let config = CONFIG.deref(); let mut response: Response = Response { @@ -112,7 +112,9 @@ async fn handle_connection(mut stream: TcpStream) -> Result<(i32, String), Box