vfmt: simplify reading source lines

pull/3725/head
Alexey 2020-02-13 01:19:45 +03:00 committed by GitHub
parent 8d76f7d195
commit f00ab076d1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 3 deletions

View File

@ -337,11 +337,10 @@ fn file_to_mod_name_and_is_module_file(file string) (string,bool) {
}
fn read_source_lines(file string) ?[]string {
raw_fcontent := os.read_file(file) or {
source_lines := os.read_lines(file) or {
return error('can not read $file')
}
fcontent := raw_fcontent.replace('\r\n', '\n')
return fcontent.split('\n')
return source_lines
}
fn get_compile_name_of_potential_v_project(file string) string {