1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

checker/gen: add unchecked exprs & small fixes

This commit is contained in:
Joe Conigliaro
2020-03-18 19:56:19 +11:00
parent a011b8951a
commit 126ef0f5c2
5 changed files with 58 additions and 40 deletions

View File

@@ -235,14 +235,14 @@ fn vfopen(path, mode string) &C.FILE {
// read_lines reads the file in `path` into an array of lines.
pub fn read_lines(path string) ?[]string {
buf := read_file(path) or {
return err
return error(err)
}
return buf.split_into_lines()
}
fn read_ulines(path string) ?[]ustring {
lines := read_lines(path) or {
return err
return error(err)
}
// mut ulines := new_array(0, lines.len, sizeof(ustring))
mut ulines := []ustring