The only thing I still have trouble with is how to create custom Error enums. It seems like a lot of typing, which isn't great. Wish creating enums over enums over enums would be easier. Pretty sure there's a way to make that possible though! :D
-
-
Show this thread
-
Oh actually, I guess all we need is a single macro to match (inner) Error enums + (outer) Error structs and we should be good! Okay; excited that this is possible! Probably the other thing that would be brilliant would be a way to match these back to `ensure!()` statements.
Show this thread -
Oh, don't think I've talked about `ensure!()` at all. It's the Result equivalent of `assert!()`. So if you think of assert as "panic if this conditional is false", you can think of ensure as "return an Error if this conditional is false". One line error handling is great!
Show this thread
End of conversation
New conversation -
-
-
Was thinking about using this, but it seems that the big rewrite to 1.0 is still not released (or I could not find it), so temporarily I have given up — to not rewrite my code in a couple of weeks...
-
I believe it's going to be forward compatible, so there shouldn't be too many worries there :D
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.