Skip to content

Commit

Permalink
update: bringup to axum v0.8.0 (#30)
Browse files Browse the repository at this point in the history
removed: async-trait usage, msrv for axum is now 1.75.0
  • Loading branch information
thed0ct0r authored Jan 1, 2025
1 parent bde776a commit aff52b4
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 14 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ repository = "https://github.com/imbolc/axum-client-ip"
version = "0.6.1"

[dependencies]
axum = { version = "0.7", default-features = false, features = [
axum = { version = "0.8", default-features = false, features = [
"http1",
"tokio",
] }
Expand Down
2 changes: 0 additions & 2 deletions src/insecure.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ use std::{
};

use axum::{
async_trait,
extract::{ConnectInfo, FromRequestParts},
http::{request::Parts, Extensions, HeaderMap, HeaderValue, StatusCode},
};
Expand Down Expand Up @@ -64,7 +63,6 @@ impl InsecureClientIp {
}
}

#[async_trait]
impl<S> FromRequestParts<S> for InsecureClientIp
where
S: Sync,
Expand Down
9 changes: 0 additions & 9 deletions src/rudimental.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
use std::net::IpAddr;

use axum::{
async_trait,
extract::FromRequestParts,
http::{request::Parts, HeaderMap},
};
Expand Down Expand Up @@ -141,7 +140,6 @@ macro_rules! impl_single_header {
const HEADER: &'static str = $header;
}

#[async_trait]
impl<S> FromRequestParts<S> for $type
where
S: Sync,
Expand Down Expand Up @@ -183,7 +181,6 @@ impl SingleIpHeader for CloudFrontViewerAddress {
}
}

#[async_trait]
impl<S> FromRequestParts<S> for CloudFrontViewerAddress
where
S: Sync,
Expand Down Expand Up @@ -228,7 +225,6 @@ impl MultiIpHeader for Forwarded {
}
}

#[async_trait]
impl<S> FromRequestParts<S> for XForwardedFor
where
S: Sync,
Expand All @@ -240,7 +236,6 @@ where
}
}

#[async_trait]
impl<S> FromRequestParts<S> for LeftmostXForwardedFor
where
S: Sync,
Expand All @@ -255,7 +250,6 @@ where
}
}

#[async_trait]
impl<S> FromRequestParts<S> for RightmostXForwardedFor
where
S: Sync,
Expand All @@ -270,7 +264,6 @@ where
}
}

#[async_trait]
impl<S> FromRequestParts<S> for Forwarded
where
S: Sync,
Expand All @@ -282,7 +275,6 @@ where
}
}

#[async_trait]
impl<S> FromRequestParts<S> for LeftmostForwarded
where
S: Sync,
Expand All @@ -296,7 +288,6 @@ where
}
}

#[async_trait]
impl<S> FromRequestParts<S> for RightmostForwarded
where
S: Sync,
Expand Down
2 changes: 0 additions & 2 deletions src/secure.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ use std::{
};

use axum::{
async_trait,
extract::{ConnectInfo, Extension, FromRequestParts},
http::{request::Parts, Extensions, HeaderMap, HeaderValue},
};
Expand Down Expand Up @@ -123,7 +122,6 @@ impl SecureClientIp {
}
}

#[async_trait]
impl<S> FromRequestParts<S> for SecureClientIp
where
S: Sync,
Expand Down

0 comments on commit aff52b4

Please sign in to comment.