restructuring page:index
This commit is contained in:
parent
e201ea7058
commit
d13abe7afa
8 changed files with 80 additions and 73 deletions
20
content/programming/blog/try-is-not-the-only-option.tree
Normal file
20
content/programming/blog/try-is-not-the-only-option.tree
Normal file
|
@ -0,0 +1,20 @@
|
|||
%% title = "`?` is not the only option"
|
||||
|
||||
% id = "01J4J6400Q4MWF2QPGX3P9Q2WQ"
|
||||
- if there's one thing I learned from Go...
|
||||
|
||||
```rust
|
||||
let mut list = WalkList::new(args);
|
||||
|
||||
let condition = list.expect_arg(c, src, "missing `if` condition");
|
||||
let if_true = list.expect_arg(c, src, "missing `if` true branch");
|
||||
let if_false = list.expect_arg(c, src, "missing `if` false branch");
|
||||
list.expect_nil(c, src, "extra arguments after `if` false branch");
|
||||
|
||||
if !list.ok {
|
||||
return Ok(());
|
||||
}
|
||||
```
|
||||
|
||||
...it's that `?` is not the only option.
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue