Skip to content

Commit

Permalink
Merge pull request #45 from stephank/feat/upgrade
Browse files Browse the repository at this point in the history
Upgrade to hyper 1.0
  • Loading branch information
stephank authored Nov 15, 2023
2 parents 7693e1f + 94d39db commit 960a750
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,20 @@ 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"
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"] }

Expand Down
2 changes: 1 addition & 1 deletion src/vfs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(())) => {
Expand Down
4 changes: 2 additions & 2 deletions tests/static.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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()
Expand Down

0 comments on commit 960a750

Please sign in to comment.