Skip to content

Commit 05722e2

Browse files
authored
Merge pull request #148 from http-rs/backports-fix-1.3.x-async-std
Fix async-std 1.6.0 channel changes
2 parents c2ed53d + 86cc896 commit 05722e2

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "http-types"
3-
version = "1.3.0"
3+
version = "1.3.1"
44
license = "MIT OR Apache-2.0"
55
repository = "https://github.com/http-rs/http-types"
66
documentation = "https://docs.rs/http-types"
@@ -24,7 +24,7 @@ hyperium_http = ["http"]
2424
[dependencies]
2525

2626
# Note(yoshuawuyts): used for async_std's `channel` only; use "core" once possible.
27-
async-std = { version = "1.4.0", features = ["unstable"] }
27+
async-std = { version = "1.6.0", features = ["unstable"] }
2828

2929
# features: hyperium/http
3030
http = { version = "0.2.0", optional = true }

src/request.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,7 @@ impl Request {
441441

442442
/// Receive trailers from a sender.
443443
pub async fn recv_trailers(&self) -> Option<crate::Result<Trailers>> {
444-
self.receiver.recv().await
444+
self.receiver.recv().await.ok()
445445
}
446446

447447
/// An iterator visiting all header pairs in arbitrary order.

src/response.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,7 @@ impl Response {
406406

407407
/// Receive trailers from a sender.
408408
pub async fn recv_trailers(&self) -> Option<crate::Result<Trailers>> {
409-
self.receiver.recv().await
409+
self.receiver.recv().await.ok()
410410
}
411411

412412
/// An iterator visiting all header pairs in arbitrary order.

0 commit comments

Comments
 (0)