feat(status): add StatusCode::try_from(u16).

This is a temporary function until the `TryFrom` trait stabilizes.

BREAKING CHANGE: Removes the undocumented `from_u16` function. Use
  `StatusCode::try_from` instead.

  Also makes the `status` module private. All imports of
  `hyper::status::StatusCode` should be `hyper::StatusCode`.
This commit is contained in:
Sean McArthur
2017-06-13 09:49:27 -07:00
parent c166268c07
commit f953cafe27
4 changed files with 44 additions and 7 deletions

View File

@@ -57,6 +57,6 @@ mod method;
pub mod header;
mod http;
pub mod server;
pub mod status;
mod status;
mod uri;
mod version;