Skip to content

Commit

Permalink
Merge pull request #2022 from CosmWasm/micro-fix-in-iterator
Browse files Browse the repository at this point in the history
Refactored iterator usage
  • Loading branch information
chipshort authored Feb 8, 2024
2 parents b0de3b8 + 0d767df commit fa2fea3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/go-gen/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
///
/// It starts with the full string and ends with the last character.
/// It is a double-ended iterator and can be reversed.
pub fn suffixes(s: &str) -> impl Iterator<Item = &str> + DoubleEndedIterator {
pub fn suffixes(s: &str) -> impl DoubleEndedIterator<Item = &str> {
s.char_indices().map(|(pos, _)| &s[pos..])
}

Expand Down

0 comments on commit fa2fea3

Please sign in to comment.