Skip to content

Commit fa88e80

Browse files
committed
Update with new suffix3
1 parent dc73989 commit fa88e80

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/content/docs/Language Common/optionals-advanced.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ fn void? test_read()
5757
{
5858
io::printfn("Excuse found: %s", excuse);
5959
// Returning Excuse using the `~` suffix
60-
return excuse?;
60+
return excuse~;
6161
}
6262
6363
// `read_buffer` behaves like a normal variable here

src/content/docs/Language Common/optionals-essential.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ fn void? test()
7777
if (catch excuse = foo)
7878
{
7979
// Return the excuse with `~` operator
80-
return excuse?;
80+
return excuse~;
8181
}
8282
// Because the compiler knows 'foo' cannot
8383
// be empty here, it is unwrapped to non-Optional
@@ -106,7 +106,7 @@ fn void? test()
106106
int bar = maybe_function()!;
107107
// ✅ The above is equivalent to:
108108
// int? temp = maybe_function();
109-
// if (catch excuse = temp) return excuse?
109+
// if (catch excuse = temp) return excuse~
110110
111111
// Now temp is unwrapped to a non-Optional
112112
int bar = temp; // ✅ This is OK

0 commit comments

Comments
 (0)