mirror of
https://github.com/YGGverse/aquatic.git
synced 2026-04-02 02:35:31 +00:00
Use idiomatic feature names & namespace support from Rust 1.60
This commit is contained in:
parent
fc9211835e
commit
c229872134
12 changed files with 22 additions and 29 deletions
|
|
@ -22,9 +22,6 @@ name = "bench_announce_response_to_bytes"
|
|||
path = "benches/bench_announce_response_to_bytes.rs"
|
||||
harness = false
|
||||
|
||||
[features]
|
||||
with-axum = ["axum"]
|
||||
|
||||
[dependencies]
|
||||
anyhow = "1"
|
||||
axum = { version = "0.5", optional = true, default-features = false }
|
||||
|
|
|
|||
|
|
@ -117,7 +117,7 @@ impl AnnounceResponse {
|
|||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "with-axum")]
|
||||
#[cfg(feature = "axum")]
|
||||
impl axum::response::IntoResponse for AnnounceResponse {
|
||||
fn into_response(self) -> axum::response::Response {
|
||||
let mut response_bytes = Vec::with_capacity(128);
|
||||
|
|
@ -158,7 +158,7 @@ impl ScrapeResponse {
|
|||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "with-axum")]
|
||||
#[cfg(feature = "axum")]
|
||||
impl axum::response::IntoResponse for ScrapeResponse {
|
||||
fn into_response(self) -> axum::response::Response {
|
||||
let mut response_bytes = Vec::with_capacity(128);
|
||||
|
|
@ -197,7 +197,7 @@ impl FailureResponse {
|
|||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "with-axum")]
|
||||
#[cfg(feature = "axum")]
|
||||
impl axum::response::IntoResponse for FailureResponse {
|
||||
fn into_response(self) -> axum::response::Response {
|
||||
let mut response_bytes = Vec::with_capacity(64);
|
||||
|
|
@ -229,7 +229,7 @@ impl Response {
|
|||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "with-axum")]
|
||||
#[cfg(feature = "axum")]
|
||||
impl axum::response::IntoResponse for Response {
|
||||
fn into_response(self) -> axum::response::Response {
|
||||
match self {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue