Compare commits
4 Commits
084b92cd6f
...
dba5f1e416
Author | SHA1 | Date |
---|---|---|
n4n5 | dba5f1e416 | |
n4n5 | a6b720332d | |
n4n5 | 2996d4d709 | |
Bartel Sielski | 60c50cdea2 |
|
@ -1,6 +1,6 @@
|
|||
# 0.22.0
|
||||
- Make `url::Url` as feature
|
||||
- Add Header and subprotocol support at creation
|
||||
- Make `url` optional.
|
||||
- Add a builder for convenient headers and subprotocols construction.
|
||||
|
||||
# 0.21.0
|
||||
- Fix read-predominant auto pong responses not flushing when hitting WouldBlock errors.
|
||||
|
|
|
@ -7,7 +7,7 @@ authors = ["Alexey Galakhov", "Daniel Abramov"]
|
|||
license = "MIT OR Apache-2.0"
|
||||
readme = "README.md"
|
||||
homepage = "https://github.com/snapview/tungstenite-rs"
|
||||
documentation = "https://docs.rs/tungstenite/0.21.0"
|
||||
documentation = "https://docs.rs/tungstenite/0.22.0"
|
||||
repository = "https://github.com/snapview/tungstenite-rs"
|
||||
version = "0.22.0"
|
||||
edition = "2018"
|
||||
|
|
|
@ -86,10 +86,10 @@ pub fn create_response(request: &Request) -> Result<Response> {
|
|||
}
|
||||
|
||||
/// Create a response for the request with a custom body.
|
||||
pub fn create_response_with_body<T>(
|
||||
request: &HttpRequest<T>,
|
||||
generate_body: impl FnOnce() -> T,
|
||||
) -> Result<HttpResponse<T>> {
|
||||
pub fn create_response_with_body<T1, T2>(
|
||||
request: &HttpRequest<T1>,
|
||||
generate_body: impl FnOnce() -> T2,
|
||||
) -> Result<HttpResponse<T2>> {
|
||||
Ok(create_parts(request)?.body(generate_body())?)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue