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

cli: prevent need for unsafe block (#5937)

This commit is contained in:
Lukas Neubert 2020-07-22 19:53:49 +02:00 committed by GitHub
parent d820a97c83
commit 4096432a1d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -144,7 +144,7 @@ fn pretty_description(s string, indent_len int) string {
mut i := chars_per_line - 2
mut j := 0
for ; i < line.len; i += chars_per_line - 2 {
for line.str[i] != ` ` {
for line[i] != ` ` {
i--
}
// indent was already done the first iteration