From e3cfe360a106d38e217605beba6359e232af6047 Mon Sep 17 00:00:00 2001 From: Matthias Ahouansou Date: Thu, 11 Jul 2024 13:24:06 +0100 Subject: [PATCH] simplify conversion to restriction --- src/service/rate_limiting/mod.rs | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/service/rate_limiting/mod.rs b/src/service/rate_limiting/mod.rs index ca2995ab..d17fa4dd 100644 --- a/src/service/rate_limiting/mod.rs +++ b/src/service/rate_limiting/mod.rs @@ -29,13 +29,7 @@ impl From for Restriction { ), ] .into_iter() - .find(|(other, _)| { - metadata - .history - .stable_paths() - .zip(other.history.stable_paths()) - .all(|(a, b)| a == b) - }) + .find(|(other, _)| metadata.history.all_paths().eq(other.history.all_paths())) .map(|(_, restriction)| restriction) .unwrap_or_default() }