Skip to content

Commit b712d17

Browse files
committed
refactor. remove unused code
1 parent d4cd7ce commit b712d17

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

src/api.rs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ pub async fn limit(
273273
}
274274
if account_limit
275275
.rate
276-
.check_key(&origin_ip.into_inner())
276+
.check_key(&origin_ip.to_string())
277277
.is_err()
278278
{
279279
return Err(Error::TooManyRequests(Some(String::from(
@@ -407,12 +407,6 @@ impl fmt::Display for OriginIp {
407407
}
408408
}
409409

410-
impl OriginIp {
411-
pub fn into_inner(self) -> String {
412-
self.0.to_string()
413-
}
414-
}
415-
416410
#[axum::async_trait]
417411
impl<S: Send + Sync> FromRequestParts<S> for OriginIp {
418412
type Rejection = Error;

0 commit comments

Comments
 (0)