Skip to content

Commit

Permalink
v0.1.8
Browse files Browse the repository at this point in the history
  • Loading branch information
seanmonstar committed Oct 25, 2018
1 parent a704570 commit f71eee4
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 2 deletions.
31 changes: 31 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,34 @@
### v0.1.8 (October 25, 2018)

- **Features**:
- Improved flexibility of `Rejection` system.

The `Rejection` type can now nest and combine arbitrary rejections,
so it is no longer bound to a small set of meanings. The ranking of
status codes is still used to determine which rejection gets priority.

A different priority can be implemented by handling rejections with
a `Filter::recover`, and searching for causes in order via
`Rejection::find_cause`.
- Adds `warp::reject::custom()` to create a `Rejection` with
any `Into<Box<std::error::Error>>`. These rejections should be
handled with an eventual `Filter::recover`. Any unhandled
custom rejections are considered a server error.
- Deprecates `Rejection::with`. Use custom rejections instead.
- Deprecates `Rejection::into_cause`, as it can no longer work. Always
returns `Err(Rejection)`.
- Deprecates `Rejection::json`, since the format needed is too generic.
The `errors.rs` example shows how to send custom JSON when recovering
from rejections.
- Deprecates `warp::reject()`, since it current signals a `400 Bad
Request`, but in newer versions, it will signal `404 Not Found`.
It's deprecated simply to warn that the semantics are changing,
but the function won't actually go away.
- Deprecates `reject::bad_request()`, `reject::forbidden()`, and
`reject::server_error()`. Uses custom rejections instead.
- Renamed `warp::path::index` to `warp::path::end`.


### v0.1.7 (October 15, 2018)

- **Features**:
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "warp"
version = "0.1.7" # don't forget to update html_root_url
version = "0.1.8" # don't forget to update html_root_url
description = "serve the web at warp speeds"
authors = ["Sean McArthur <[email protected]>"]
license = "MIT"
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![doc(html_root_url = "https://docs.rs/warp/0.1.7")]
#![doc(html_root_url = "https://docs.rs/warp/0.1.8")]
#![deny(missing_docs)]
#![deny(missing_debug_implementations)]
#![cfg_attr(test, deny(warnings))]
Expand Down

0 comments on commit f71eee4

Please sign in to comment.