Re:A Week with Mozilla's Rust
by klibertp on Thursday August 22, 2013 @10:06AM
(#6257192)
You probably should fix this in your code too. As noted in this thread, that's not a proper way to use pattern matching. Anyone reading your code will be confused by this usage and that's not a good thing. It probably would be best to use this:
Which is much prettier (and more succinct) than both your original code and my example. You could also use a `cond!()` macro here, but that would mean you don't have an example for a blog post, so I think the above code is the best option. Thanks to kzrdude for posting.
[ Parent
| on HN ]
There are no comments on this comment yet.