We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents f27f37e + 36e63c8 commit 16e8797Copy full SHA for 16e8797
src/lib.rs
@@ -32,7 +32,7 @@ impl Static {
32
33
impl Handler for Static {
34
#[allow(deprecated)]
35
- fn call(&self, request: &mut Request) -> Result<Response, Box<Error+Send>> {
+ fn call(&self, request: &mut dyn Request) -> Result<Response, Box<dyn Error+Send>> {
36
let request_path = &request.path()[1..];
37
if request_path.contains("..") { return Ok(not_found()) }
38
@@ -42,7 +42,7 @@ impl Handler for Static {
42
Ok(f) => f,
43
Err(..) => return Ok(not_found()),
44
};
45
- let data = try!(file.metadata().map_err(|e| Box::new(e) as Box<Error+Send>));
+ let data = file.metadata().map_err(|e| Box::new(e) as Box<dyn Error+Send>)?;
46
if data.is_dir() {
47
return Ok(not_found())
48
}
0 commit comments