Skip to content

Commit 9ea4ce6

Browse files
committed
native: fix reexport output
1 parent fcf019c commit 9ea4ce6

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

native/src/main.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,9 @@ fn main() {
4141
&& !is_node_builtin_module(&reexport)
4242
{
4343
stdout
44-
.write_all(("@".to_owned() + reexport.as_str()).as_bytes())
44+
.write_all(("@".to_owned() + reexport.as_str() + "\n").as_bytes())
4545
.expect("failed to write result to stdout");
46+
return;
4647
}
4748
}
4849
for export in exports {
@@ -163,11 +164,12 @@ fn is_js_identifier(s: &str) -> bool {
163164
if s.len() == 0 {
164165
return false;
165166
}
166-
let first_char = s.chars().next().unwrap();
167+
let mut chars = s.chars();
168+
let first_char = chars.next().unwrap();
167169
if !is_alphabetic(first_char) {
168170
return false;
169171
}
170-
for c in s.chars() {
172+
for c in chars {
171173
if !is_alphabetic(c) && !is_numberic(c) {
172174
return false;
173175
}

0 commit comments

Comments
 (0)