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> {
113
113
let mut inner = self . inner ;
114
114
for element in 0 ..self . elements {
115
115
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
+ {
117
122
rest = & rest[ 1 ..] ;
118
123
}
119
124
let i: usize = inner[ ..( inner. len ( ) - rest. len ( ) ) ] . parse ( ) . unwrap ( ) ;
@@ -132,7 +137,7 @@ impl<'a> fmt::Display for Demangle<'a> {
132
137
}
133
138
loop {
134
139
if rest. starts_with ( '.' ) {
135
- if let Some ( '.' ) = rest[ 1 ..] . chars ( ) . next ( ) {
140
+ if let Some ( b '.') = rest[ 1 ..] . bytes ( ) . next ( ) {
136
141
f. write_str ( "::" ) ?;
137
142
rest = & rest[ 2 ..] ;
138
143
} else {
You can’t perform that action at this time.
0 commit comments