Skip to content

Commit

Permalink
Remove redundant into_iter
Browse files Browse the repository at this point in the history
  • Loading branch information
olanod committed May 23, 2024
1 parent 6da3eb6 commit 3503e9c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion substrate/frame/referenda/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ where

/// Return the track info for track `id`, by default this just looks it up in `Self::tracks()`.
fn info(id: Self::Id) -> Option<Cow<'static, TrackInfo<Balance, Moment, N>>> {
Self::tracks().into_iter().find(|x| x.id == id).map(|t| match t {
Self::tracks().find(|x| x.id == id).map(|t| match t {
Cow::Borrowed(x) => Cow::Borrowed(&x.info),
Cow::Owned(x) => Cow::Owned(x.info),
})
Expand Down

0 comments on commit 3503e9c

Please sign in to comment.