Skip to content

Commit cc2689a

Browse files
committed
implement nth_back for Bytes
1 parent 3b27b4f commit cc2689a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/libcore/str/mod.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -795,6 +795,11 @@ impl DoubleEndedIterator for Bytes<'_> {
795795
self.0.next_back()
796796
}
797797

798+
#[inline]
799+
fn nth_back(&mut self, n: usize) -> Option<Self::Item> {
800+
self.0.nth_back(n)
801+
}
802+
798803
#[inline]
799804
fn rfind<P>(&mut self, predicate: P) -> Option<Self::Item> where
800805
P: FnMut(&Self::Item) -> bool

0 commit comments

Comments
 (0)