File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 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 {
354354/// UTF-8-like encoding).
355355#[ unstable( feature = "str_internals" , issue = "0" ) ]
356356#[ 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 > {
358358 // Decode UTF-8
359359 let x = match bytes. next ( ) {
360360 None => return None ,
@@ -388,7 +388,8 @@ pub fn next_code_point(bytes: &mut slice::Iter<u8>) -> Option<u32> {
388388/// Reads the last code point out of a byte iterator (assuming a
389389/// UTF-8-like encoding).
390390#[ 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 > {
392393 // Decode UTF-8
393394 let w = match bytes. next_back ( ) {
394395 None => return None ,
You can’t perform that action at this time.
0 commit comments