From bdf12c2bbdf839caa653c7347b58508a22f628c0 Mon Sep 17 00:00:00 2001 From: Matthias Ahouansou Date: Wed, 26 Jun 2024 11:42:17 +0100 Subject: [PATCH] use into_iter --- src/service/rate_limiting/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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() } }