diff --git a/src/service/rate_limiting/mod.rs b/src/service/rate_limiting/mod.rs index be24f7fc..1f5ef0a1 100644 --- a/src/service/rate_limiting/mod.rs +++ b/src/service/rate_limiting/mod.rs @@ -23,7 +23,7 @@ impl From for Restriction { (register::v3::Request::METADATA, Restriction::Registration), (login::v3::Request::METADATA, Restriction::Login), ] - .iter() + .into_iter() .find(|(other, _)| { metadata .history @@ -31,7 +31,7 @@ impl From for Restriction { .zip(other.history.stable_paths()) .all(|(a, b)| a == b) }) - .map(|(_, restriction)| restriction.to_owned()) + .map(|(_, restriction)| restriction) .unwrap_or_default() } }