|
|
|
|
|
by bigstrat2003
11 days ago
|
|
I'm really confused by the unwrap_or_break example in this text. The article says it wouldn't be possible to do without a macro, but how is it not equivalent to for d: Option<i32> in data {
let val: i32 = match d {
Some(v) => v,
None => break
};
// Other stuff
}
As far as I can tell that would do the exact same thing as the macro example. |
|