mirror of
https://github.com/swc-project/swc.git
synced 2024-11-23 17:54:15 +03:00
Replace hard split on \n with ::lines() + ::trim() to fix \r\n
This commit is contained in:
parent
75e83860be
commit
ba75072509
@ -3,7 +3,7 @@ extern crate string_cache_codegen;
|
||||
use std::{env, path::Path};
|
||||
|
||||
fn main() {
|
||||
let strs = include_str!("words.txt").split("\n").collect::<Vec<_>>();
|
||||
let strs = include_str!("words.txt").lines().map(|l| l.trim()).collect::<Vec<_>>();
|
||||
gen("js_word", "JsWord", &strs);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user