diff --git a/doc/docs.md b/doc/docs.md index cb9b10110f..b36becd6d0 100644 --- a/doc/docs.md +++ b/doc/docs.md @@ -5324,7 +5324,7 @@ Full list of builtin options: import os fn main() { embedded_file := $embed_file('v.png') - os.write_file('exported.png', embedded_file.to_string())? + os.write_file('exported.png', embedded_file.to_string())! } ``` @@ -5348,7 +5348,7 @@ Currently only one compression type is supported: `zlib` import os fn main() { embedded_file := $embed_file('v.png', .zlib) // compressed using zlib - os.write_file('exported.png', embedded_file.to_string())? + os.write_file('exported.png', embedded_file.to_string())! } ``` diff --git a/thirdparty/stdatomic/nix/cpp/gen.v b/thirdparty/stdatomic/nix/cpp/gen.v index 44e0f24fbe..7d5d9d268b 100644 --- a/thirdparty/stdatomic/nix/cpp/gen.v +++ b/thirdparty/stdatomic/nix/cpp/gen.v @@ -84,16 +84,16 @@ fn find_file(search_paths []string, file string) ?string { return error('${file} not found') } -fn patch_atomic(outfile string, infile string) ? { - lines := os.read_file(infile)?.split('\n') +fn patch_atomic(outfile string, infile string) ! { + lines := os.read_file(infile)!.split('\n') outlines := lines.filter(!it.contains('atomic(const atomic&) = delete;')) outtext := outlines.join('\n').replace('#include ', '#include "bitsatomicbase.h"') - os.write_file(outfile, outtext)? + os.write_file(outfile, outtext)! } -fn patch_bitsatomicbase(outfile string, infile string) ? { - lines := os.read_file(infile)?.split('\n') +fn patch_bitsatomicbase(outfile string, infile string) ! { + lines := os.read_file(infile)!.split('\n') outlines := lines.filter(!it.contains('__atomic_base(const __atomic_base&) = delete;')) outtext := outlines.join('\n').replace('#include ', '#include "bitsatomicbase.h"') - os.write_file(outfile, outtext)? + os.write_file(outfile, outtext)! } diff --git a/vlib/v/slow_tests/crun_mode/crun_test.v b/vlib/v/slow_tests/crun_mode/crun_test.v index b957d5b1a1..0ec3be95a9 100644 --- a/vlib/v/slow_tests/crun_mode/crun_test.v +++ b/vlib/v/slow_tests/crun_mode/crun_test.v @@ -21,7 +21,7 @@ fn testsuite_end() { } fn test_saving_simple_v_program() { - os.write_file(vprogram_file, 'print("hello")')? + os.write_file(vprogram_file, 'print("hello")')! assert true } diff --git a/vlib/v/tests/closure_generator_test.v b/vlib/v/tests/closure_generator_test.v index 47e4a515fa..5e9a264dfd 100644 --- a/vlib/v/tests/closure_generator_test.v +++ b/vlib/v/tests/closure_generator_test.v @@ -165,7 +165,7 @@ fn test_closure_return_${styp}_${i}() ? { wrkdir := os.join_path(os.vtmp_dir(), 'v', 'tests', 'closures') os.mkdir_all(wrkdir)? os.chdir(wrkdir)? - os.write_file('closure_return_test.v', code)? + os.write_file('closure_return_test.v', code)! vexe := os.getenv('VEXE') res := os.execute('${os.quoted_path(vexe)} -keepc -cg -showcc closure_return_test.v') if res.exit_code != 0 {