Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to hyper 1.0 #45

Merged
merged 2 commits into from
Nov 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading