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:
@@ -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
|
||||
|
@@ -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
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user