fix warnings
This commit is contained in:
@@ -521,7 +521,7 @@ fn read_next_line<R: Read>(reader: &mut R) -> IoResult<AsciiString> {
|
||||
let byte = reader.bytes().next();
|
||||
|
||||
let byte = match byte {
|
||||
Some(b) => r#try!(b),
|
||||
Some(b) => b?,
|
||||
None => return Err(IoError::new(ErrorKind::ConnectionAborted, "Unexpected EOF")),
|
||||
};
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ mod range;
|
||||
mod redirect;
|
||||
mod simple;
|
||||
|
||||
type RequestHandler = Fn(&Unit) -> Result<Stream, Error> + Send + 'static;
|
||||
type RequestHandler = dyn Fn(&Unit) -> Result<Stream, Error> + Send + 'static;
|
||||
|
||||
lazy_static! {
|
||||
pub(crate) static ref TEST_HANDLERS: Arc<Mutex<HashMap<String, Box<RequestHandler>>>> =
|
||||
|
||||
Reference in New Issue
Block a user