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:
parent
d6abf5472b
commit
bdf12c2bbd
1 changed files with 2 additions and 2 deletions
|
@ -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()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue