#rustlang can yinz give me a concrete example of a case in your code (not stdlib) when you would want to call `panic!`?
-
-
Replying to @Carols10cents
We use it in futures for where something has gone terribly wrong. http://alexcrichton.com/futures-rs/futures/task/struct.TaskRc.html#method.with … http://alexcrichton.com/futures-rs/futures/trait.Future.html#tymethod.poll …
1 reply 0 retweets 1 like -
Replying to @aaron_turon @Carols10cents
These are cases where the API is being used fundamentally incorrectly.
2 replies 0 retweets 0 likes -
Replying to @aaron_turon
but you don't want to tell the caller they're using it incorrectly?
2 replies 0 retweets 0 likes -
Replying to @Carols10cents
What would the caller do? "Some unknown bug was detected". Probably it needs to inform *its* caller. Hence, unwinding = good.
2 replies 0 retweets 1 like
Replying to @aaron_turon
brb copy-pasting this into the book
8:56 AM - 1 Sep 2016
0 replies
0 retweets
0 likes
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.