Skip to content

Commit

Permalink
Merge pull request #148 from http-rs/backports-fix-1.3.x-async-std
Browse files Browse the repository at this point in the history
Fix async-std 1.6.0 channel changes
  • Loading branch information
yoshuawuyts authored May 22, 2020
2 parents c2ed53d + 86cc896 commit 05722e2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "http-types"
version = "1.3.0"
version = "1.3.1"
license = "MIT OR Apache-2.0"
repository = "https://github.com/http-rs/http-types"
documentation = "https://docs.rs/http-types"
Expand All @@ -24,7 +24,7 @@ hyperium_http = ["http"]
[dependencies]

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

# features: hyperium/http
http = { version = "0.2.0", optional = true }
Expand Down
2 changes: 1 addition & 1 deletion src/request.rs
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ impl Request {

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

/// An iterator visiting all header pairs in arbitrary order.
Expand Down
2 changes: 1 addition & 1 deletion src/response.rs
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ impl Response {

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

/// An iterator visiting all header pairs in arbitrary order.
Expand Down

0 comments on commit 05722e2

Please sign in to comment.