1
0
Fork 0
mirror of https://gitlab.com/famedly/conduit.git synced 2025-06-27 16:35:59 +00:00

use into_iter

This commit is contained in:
Matthias Ahouansou 2024-06-26 11:42:17 +01:00
parent d6abf5472b
commit bdf12c2bbd
No known key found for this signature in database

View file

@ -23,7 +23,7 @@ impl From<Metadata> for Restriction {
(register::v3::Request::METADATA, Restriction::Registration), (register::v3::Request::METADATA, Restriction::Registration),
(login::v3::Request::METADATA, Restriction::Login), (login::v3::Request::METADATA, Restriction::Login),
] ]
.iter() .into_iter()
.find(|(other, _)| { .find(|(other, _)| {
metadata metadata
.history .history
@ -31,7 +31,7 @@ impl From<Metadata> for Restriction {
.zip(other.history.stable_paths()) .zip(other.history.stable_paths())
.all(|(a, b)| a == b) .all(|(a, b)| a == b)
}) })
.map(|(_, restriction)| restriction.to_owned()) .map(|(_, restriction)| restriction)
.unwrap_or_default() .unwrap_or_default()
} }
} }