File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -41,8 +41,9 @@ fn main() {
41
41
&& !is_node_builtin_module ( & reexport)
42
42
{
43
43
stdout
44
- . write_all ( ( "@" . to_owned ( ) + reexport. as_str ( ) ) . as_bytes ( ) )
44
+ . write_all ( ( "@" . to_owned ( ) + reexport. as_str ( ) + " \n " ) . as_bytes ( ) )
45
45
. expect ( "failed to write result to stdout" ) ;
46
+ return ;
46
47
}
47
48
}
48
49
for export in exports {
@@ -163,11 +164,12 @@ fn is_js_identifier(s: &str) -> bool {
163
164
if s. len ( ) == 0 {
164
165
return false ;
165
166
}
166
- let first_char = s. chars ( ) . next ( ) . unwrap ( ) ;
167
+ let mut chars = s. chars ( ) ;
168
+ let first_char = chars. next ( ) . unwrap ( ) ;
167
169
if !is_alphabetic ( first_char) {
168
170
return false ;
169
171
}
170
- for c in s . chars ( ) {
172
+ for c in chars {
171
173
if !is_alphabetic ( c) && !is_numberic ( c) {
172
174
return false ;
173
175
}
You can’t perform that action at this time.
0 commit comments