chore(server): setup ServerProto pieces to be deprecated
- Adds a `server-proto` feature that is added to default features. - If `server-proto` feature is not enabled, pieces that will eventually be deprecated and optional will be tagged deprecated, but with a note about the missing `server-proto` feature.
This commit is contained in:
20
src/lib.rs
20
src/lib.rs
@@ -39,8 +39,6 @@ extern crate unicase;
|
||||
#[cfg(all(test, feature = "nightly"))]
|
||||
extern crate test;
|
||||
|
||||
|
||||
mod common;
|
||||
pub use uri::Uri;
|
||||
pub use client::Client;
|
||||
pub use error::{Result, Error};
|
||||
@@ -55,6 +53,24 @@ pub use version::HttpVersion;
|
||||
#[cfg(feature = "raw_status")]
|
||||
pub use proto::RawStatus;
|
||||
|
||||
macro_rules! feat_server_proto {
|
||||
($($i:item)*) => ($(
|
||||
#[cfg_attr(
|
||||
not(feature = "server-proto"),
|
||||
deprecated(
|
||||
since="0.11.7",
|
||||
note="server-proto was recently added to default features, but you have disabled default features. A future version will remove these types if the server-proto feature is not enabled."
|
||||
)
|
||||
)]
|
||||
#[cfg_attr(
|
||||
not(feature = "server-proto"),
|
||||
allow(deprecated)
|
||||
)]
|
||||
$i
|
||||
)*)
|
||||
}
|
||||
|
||||
mod common;
|
||||
#[cfg(test)]
|
||||
mod mock;
|
||||
pub mod client;
|
||||
|
||||
Reference in New Issue
Block a user