docs: update deprecated function results (#18850)

This commit is contained in:
Turiiya 2023-07-13 00:43:04 +02:00 committed by GitHub
parent 52a055b6bc
commit efcb15d05b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 5 deletions

View File

@ -4551,9 +4551,9 @@ If a test function has an error return type, any propagated errors will fail the
```v ```v
import strconv import strconv
fn test_atoi() ? { fn test_atoi() ! {
assert strconv.atoi('1')? == 1 assert strconv.atoi('1')! == 1
assert strconv.atoi('one')? == 1 // test will fail assert strconv.atoi('one')! == 1 // test will fail
} }
``` ```
@ -6738,7 +6738,7 @@ fn sh(cmd string) {
rmdir_all('build') or {} rmdir_all('build') or {}
// Create build/, never fails as build/ does not exist // Create build/, never fails as build/ does not exist
mkdir('build')? mkdir('build')!
// Move *.v files to build/ // Move *.v files to build/
result := execute('mv *.v build/') result := execute('mv *.v build/')
@ -6749,7 +6749,7 @@ if result.exit_code != 0 {
sh('ls') sh('ls')
// Similar to: // Similar to:
// files := ls('.')? // files := ls('.')!
// mut count := 0 // mut count := 0
// if files.len > 0 { // if files.len > 0 {
// for file in files { // for file in files {