mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
vfmt: simplify reading source lines
This commit is contained in:
parent
8d76f7d195
commit
f00ab076d1
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user