Skip to content

Commit

Permalink
implement nth_back for Bytes
Browse files Browse the repository at this point in the history
  • Loading branch information
koalatux committed Apr 16, 2019
1 parent 3b27b4f commit cc2689a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/libcore/str/mod.rs
Expand Up @@ -795,6 +795,11 @@ impl DoubleEndedIterator for Bytes<'_> {
self.0.next_back()
}

#[inline]
fn nth_back(&mut self, n: usize) -> Option<Self::Item> {
self.0.nth_back(n)
}

#[inline]
fn rfind<P>(&mut self, predicate: P) -> Option<Self::Item> where
P: FnMut(&Self::Item) -> bool
Expand Down

0 comments on commit cc2689a

Please sign in to comment.