File tree 1 file changed +3
-2
lines changed
1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -354,7 +354,7 @@ fn unwrap_or_0(opt: Option<&u8>) -> u8 {
354
354
/// UTF-8-like encoding).
355
355
#[ unstable( feature = "str_internals" , issue = "0" ) ]
356
356
#[ inline]
357
- pub fn next_code_point ( bytes : & mut slice :: Iter < u8 > ) -> Option < u32 > {
357
+ pub fn next_code_point < ' a , I : Iterator < Item = & ' a u8 > > ( bytes : & mut I ) -> Option < u32 > {
358
358
// Decode UTF-8
359
359
let x = match bytes. next ( ) {
360
360
None => return None ,
@@ -388,7 +388,8 @@ pub fn next_code_point(bytes: &mut slice::Iter<u8>) -> Option<u32> {
388
388
/// Reads the last code point out of a byte iterator (assuming a
389
389
/// UTF-8-like encoding).
390
390
#[ inline]
391
- fn next_code_point_reverse ( bytes : & mut slice:: Iter < u8 > ) -> Option < u32 > {
391
+ fn next_code_point_reverse < ' a ,
392
+ I : DoubleEndedIterator < Item = & ' a u8 > > ( bytes : & mut I ) -> Option < u32 > {
392
393
// Decode UTF-8
393
394
let w = match bytes. next_back ( ) {
394
395
None => return None ,
You can’t perform that action at this time.
0 commit comments