Skip to content

Commit

Permalink
Update deprecated
Browse files Browse the repository at this point in the history
  • Loading branch information
ttytm committed Apr 6, 2024
1 parent 710c589 commit 10afdbb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/basename/basename.v
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ fn basename(name string, suffix string, is_zero bool) {
if name_noslash == '' {
out = '/'
} else {
if idx := name_noslash.index_last('/') {
if idx := name_noslash.last_index('/') {
out = name_noslash[idx + 1..]
} else {
out = name_noslash
Expand Down
4 changes: 2 additions & 2 deletions src/shuf/shuf.v
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ fn shuffle_lines(lines []string, settings Settings) []string {
for i in 0 .. new_lines.len {
tmp := new_lines[i]
random := rand.intn(new_lines.len) or {
common.exit_with_error_message(app_name, err.msg)
common.exit_with_error_message(app_name, err.msg())
}
new_lines[i] = new_lines[random]
new_lines[random] = tmp
Expand All @@ -109,7 +109,7 @@ fn shuffle_lines(lines []string, settings Settings) []string {
for i in 0 .. new_lines.len {
tmp := new_lines[i]
random := rand.intn(new_lines.len) or {
common.exit_with_error_message(app_name, err.msg)
common.exit_with_error_message(app_name, err.msg())
}
new_lines[i] = new_lines[random]
new_lines[random] = tmp
Expand Down

0 comments on commit 10afdbb

Please sign in to comment.