@@ -54,7 +54,7 @@ fn demange_template_args(mut str: &str) -> Option<(&str, String)> {
5454fn demangle_class ( str : & str ) -> Option < ( String , String , & str ) > {
5555 let ( size, rest) = parse_digits ( str) ?;
5656 // hack for template argument constants
57- if rest. is_empty ( ) || rest. starts_with ( "," ) {
57+ if rest. is_empty ( ) || rest. starts_with ( ',' ) {
5858 let out = format ! ( "{}" , size) ;
5959 return Some ( ( out. clone ( ) , out, rest) ) ;
6060 }
@@ -79,7 +79,7 @@ fn demangle_qualified_class(mut str: &str) -> Option<(String, String, &str)> {
7979 }
8080 Some ( ( last_class, qualified, str) )
8181 } else {
82- return demangle_class ( str) ;
82+ demangle_class ( str)
8383 }
8484}
8585
@@ -99,7 +99,7 @@ fn demangle_arg(mut str: &str) -> Option<(String, &str)> {
9999 is_member = true ;
100100 let ( _, member, rest) = demangle_qualified_class ( & str[ 1 ..] ) ?;
101101 post = format ! ( "{}::*{}" , member, post) ;
102- if !rest. starts_with ( "F" ) {
102+ if !rest. starts_with ( 'F' ) {
103103 return None ;
104104 }
105105 str = rest;
@@ -114,7 +114,7 @@ fn demangle_arg(mut str: &str) -> Option<(String, &str)> {
114114 str = & str[ 5 ..] ;
115115 }
116116 let ( args, rest) = demangle_function_args ( str) ?;
117- if !rest. starts_with ( "_" ) {
117+ if !rest. starts_with ( '_' ) {
118118 return None ;
119119 }
120120 let ( ret, rest) = demangle_arg ( & rest[ 1 ..] ) ?;
@@ -151,7 +151,7 @@ fn demangle_function_args(mut str: &str) -> Option<(String, &str)> {
151151 let ( arg, rest) = demangle_arg ( str) ?;
152152 result += arg. as_str ( ) ;
153153 str = rest;
154- if str. starts_with ( "_" ) || str. starts_with ( "," ) {
154+ if str. starts_with ( '_' ) || str. starts_with ( ',' ) {
155155 break ;
156156 }
157157 }
@@ -231,17 +231,17 @@ pub fn demangle(mut str: &str) -> Option<String> {
231231 if special {
232232 fn_name = demangle_special_function ( fn_name. as_str ( ) , class_name. as_str ( ) ) ?;
233233 }
234- if str. starts_with ( "C" ) {
234+ if str. starts_with ( 'C' ) {
235235 str = & str[ 1 ..] ;
236236 cnst = true ;
237237 }
238- if str. starts_with ( "F" ) {
238+ if str. starts_with ( 'F' ) {
239239 str = & str[ 1 ..] ;
240240 let ( args, rest) = demangle_function_args ( str) ?;
241241 fn_name = format ! ( "{}({})" , fn_name, args) ;
242242 str = rest;
243243 }
244- if str. starts_with ( "_" ) {
244+ if str. starts_with ( '_' ) {
245245 str = & str[ 1 ..] ;
246246 let ( ret, rest) = demangle_arg ( str) ?;
247247 qualified = format ! ( "{} {}" , ret, qualified) ;
0 commit comments