File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -113,7 +113,12 @@ impl<'a> fmt::Display for Demangle<'a> {
113113 let mut inner = self . inner ;
114114 for element in 0 ..self . elements {
115115 let mut rest = inner;
116- while rest. chars ( ) . next ( ) . unwrap ( ) . is_digit ( 10 ) {
116+ while rest
117+ . bytes ( )
118+ . next ( )
119+ . map ( |c| ( c as char ) . is_digit ( 10 ) )
120+ . unwrap_or ( false )
121+ {
117122 rest = & rest[ 1 ..] ;
118123 }
119124 let i: usize = inner[ ..( inner. len ( ) - rest. len ( ) ) ] . parse ( ) . unwrap ( ) ;
@@ -132,7 +137,7 @@ impl<'a> fmt::Display for Demangle<'a> {
132137 }
133138 loop {
134139 if rest. starts_with ( '.' ) {
135- if let Some ( '.' ) = rest[ 1 ..] . chars ( ) . next ( ) {
140+ if let Some ( b '.') = rest[ 1 ..] . bytes ( ) . next ( ) {
136141 f. write_str ( "::" ) ?;
137142 rest = & rest[ 2 ..] ;
138143 } else {
You can’t perform that action at this time.
0 commit comments