Skip to content

Commit

Permalink
docs: update deprecated function results (#18850)
Browse files Browse the repository at this point in the history
  • Loading branch information
ttytm committed Jul 12, 2023
1 parent 52a055b commit efcb15d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions doc/docs.md
Expand Up @@ -4551,9 +4551,9 @@ If a test function has an error return type, any propagated errors will fail the
```v
import strconv
fn test_atoi() ? {
assert strconv.atoi('1')? == 1
assert strconv.atoi('one')? == 1 // test will fail
fn test_atoi() ! {
assert strconv.atoi('1')! == 1
assert strconv.atoi('one')! == 1 // test will fail
}
```

Expand Down Expand Up @@ -6738,7 +6738,7 @@ fn sh(cmd string) {
rmdir_all('build') or {}
// Create build/, never fails as build/ does not exist
mkdir('build')?
mkdir('build')!
// Move *.v files to build/
result := execute('mv *.v build/')
Expand All @@ -6749,7 +6749,7 @@ if result.exit_code != 0 {
sh('ls')
// Similar to:
// files := ls('.')?
// files := ls('.')!
// mut count := 0
// if files.len > 0 {
// for file in files {
Expand Down

0 comments on commit efcb15d

Please sign in to comment.