Skip to content

Commit 16e8797

Browse files
Merge pull request #4 from jtgeibel/fix-warnings
Fix warnings
2 parents f27f37e + 36e63c8 commit 16e8797

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/lib.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ impl Static {
3232

3333
impl Handler for Static {
3434
#[allow(deprecated)]
35-
fn call(&self, request: &mut Request) -> Result<Response, Box<Error+Send>> {
35+
fn call(&self, request: &mut dyn Request) -> Result<Response, Box<dyn Error+Send>> {
3636
let request_path = &request.path()[1..];
3737
if request_path.contains("..") { return Ok(not_found()) }
3838

@@ -42,7 +42,7 @@ impl Handler for Static {
4242
Ok(f) => f,
4343
Err(..) => return Ok(not_found()),
4444
};
45-
let data = try!(file.metadata().map_err(|e| Box::new(e) as Box<Error+Send>));
45+
let data = file.metadata().map_err(|e| Box::new(e) as Box<dyn Error+Send>)?;
4646
if data.is_dir() {
4747
return Ok(not_found())
4848
}

0 commit comments

Comments
 (0)