Merge pull request #11 from FauxFaux/warnings

fix warnings
This commit is contained in:
Martin Algesten
2019-09-11 14:53:38 +02:00
committed by GitHub
2 changed files with 2 additions and 2 deletions

View File

@@ -521,7 +521,7 @@ fn read_next_line<R: Read>(reader: &mut R) -> IoResult<AsciiString> {
let byte = reader.bytes().next(); let byte = reader.bytes().next();
let byte = match byte { let byte = match byte {
Some(b) => r#try!(b), Some(b) => b?,
None => return Err(IoError::new(ErrorKind::ConnectionAborted, "Unexpected EOF")), None => return Err(IoError::new(ErrorKind::ConnectionAborted, "Unexpected EOF")),
}; };

View File

@@ -15,7 +15,7 @@ mod range;
mod redirect; mod redirect;
mod simple; mod simple;
type RequestHandler = Fn(&Unit) -> Result<Stream, Error> + Send + 'static; type RequestHandler = dyn Fn(&Unit) -> Result<Stream, Error> + Send + 'static;
lazy_static! { lazy_static! {
pub(crate) static ref TEST_HANDLERS: Arc<Mutex<HashMap<String, Box<RequestHandler>>>> = pub(crate) static ref TEST_HANDLERS: Arc<Mutex<HashMap<String, Box<RequestHandler>>>> =