Skip to content

Commit

Permalink
fix: clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
fundon committed Sep 4, 2023
1 parent 3fbafa0 commit 2eae97b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion viz-core/src/body.rs
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ impl Stream for OutgoingBody {
}

impl<D> From<()> for OutgoingBody<D> {
fn from(_: ()) -> Self {
fn from((): ()) -> Self {
Self::Empty
}
}
Expand Down
2 changes: 1 addition & 1 deletion viz-core/src/response.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ pub trait ResponseExt: Sized {
{
let mut buf = BytesMut::new().writer();
serde_json::to_writer(&mut buf, &body)
.map(|_| {
.map(|()| {
Self::with(
Full::new(buf.into_inner().freeze()),
mime::APPLICATION_JSON.as_ref(),
Expand Down
4 changes: 2 additions & 2 deletions viz-core/src/types/realip.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ pub struct RealIp(pub IpAddr);

impl RealIp {
/// X-Real-IP header.
pub const X_REAL_IP: &str = "x-real-ip";
pub const X_REAL_IP: &'static str = "x-real-ip";

/// X-Forwarded-For header.
pub const X_FORWARDED_FOR: &str = "x-forwarded-for";
pub const X_FORWARDED_FOR: &'static str = "x-forwarded-for";

/// Parse the headers.
pub fn parse(req: &Request) -> Option<Self> {
Expand Down

0 comments on commit 2eae97b

Please sign in to comment.