diff --git a/Cargo.toml b/Cargo.toml index 1464dad..922289d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,10 +13,10 @@ edition = "2018" [dependencies] futures-util = "0.3.1" -http = "0.2.0" +http = "1.0.0" httpdate = "1.0.1" http-range = "0.1.4" -hyper = "1.0.0-rc.4" +hyper = "1.0.0" mime_guess = "2.0.1" percent-encoding = "2.1.0" rand = "0.8.4" @@ -24,9 +24,9 @@ tokio = { version = "1.0.0", features = ["fs"] } url = "2.1.0" [dev-dependencies] -hyper = { version = "1.0.0-rc.4", features = ["http1", "server"] } +hyper = { version = "1.0.0", features = ["http1", "server"] } hyper-util = { git = "https://github.com/hyperium/hyper-util.git" } -http-body-util = "0.1.0-rc.3" +http-body-util = "0.1.0" tempfile = "3" tokio = { version = "1.0.0", features = ["macros", "rt-multi-thread", "net", "io-util"] } diff --git a/src/vfs.rs b/src/vfs.rs index d0ce8a3..1b56094 100644 --- a/src/vfs.rs +++ b/src/vfs.rs @@ -142,7 +142,7 @@ impl FileAccess for TokioFileAccess { ref mut read_buf, } = *self; - let len = min(len, read_buf.len()) as usize; + let len = min(len, read_buf.len()); let mut read_buf = ReadBuf::uninit(&mut read_buf[..len]); match Pin::new(file).poll_read(cx, &mut read_buf) { Poll::Ready(Ok(())) => { diff --git a/tests/static.rs b/tests/static.rs index ec907d3..785f168 100644 --- a/tests/static.rs +++ b/tests/static.rs @@ -264,7 +264,7 @@ async fn last_modified_is_gmt() { let mut file_path = harness.dir.path().to_path_buf(); file_path.push("file1.html"); let status = Command::new("touch") - .args(&["-t", "198510260122.00"]) + .args(["-t", "198510260122.00"]) .arg(file_path) .env("TZ", "UTC") .status() @@ -288,7 +288,7 @@ async fn no_headers_for_invalid_mtime() { let mut file_path = harness.dir.path().to_path_buf(); file_path.push("file1.html"); let status = Command::new("touch") - .args(&["-t", "197001010000.01"]) + .args(["-t", "197001010000.01"]) .arg(file_path) .env("TZ", "UTC") .status()