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

fmt: fix if cond break readability (#8132)

This commit is contained in:
Daniel Däschle
2021-01-16 02:12:17 +01:00
committed by GitHub
parent 2f7a66386e
commit 53941c4a0a
29 changed files with 272 additions and 133 deletions

View File

@@ -772,7 +772,8 @@ fn normalize_drive_letter(path string) string {
return path
}
if path.len > 2 &&
path[0] >= `a` && path[0] <= `z` && path[1] == `:` && path[2] == path_separator[0] {
path[0] >= `a` && path[0] <= `z` && path[1] == `:` && path[2] == path_separator[0]
{
unsafe {
x := &path.str[0]
(*x) = *x - 32

View File

@@ -94,7 +94,8 @@ pub fn ls(path string) ?[]string {
unsafe {
if bptr[0] == 0 ||
(bptr[0] == `.` && bptr[1] == 0) ||
(bptr[0] == `.` && bptr[1] == `.` && bptr[2] == 0) {
(bptr[0] == `.` && bptr[1] == `.` && bptr[2] == 0)
{
continue
}
}