Speaking of enums, I kind of wish we could make something like this happen eventually. I'm not 100% convinced it makes sense yet, but being to express more constraints on what's valid in type signatures seems pretty valuable! https://play.rust-lang.org/?version=stable&mode=debug&edition=2015&gist=09a291c8e9567eee31afdd77443842ac …
-
-
Replying to @yoshuawuyts
Ugh I've definitely wanted this before, where I group things logically together by enum, but have time type signature in a fn be able to work as if it was it's own type. I know only one type goes in, but rust makes me handle the rest
1 reply 0 retweets 1 like -
Replying to @mgattozzi @yoshuawuyts
I end up using unchecked_unreachable in that case but I like it when the compiler figured out for me
1 reply 0 retweets 1 like -
Replying to @mgattozzi
Yeah, that's what I was planning to do too. I'm exporting it in a public trait, which kind of makes it feel a bit meant :(
2 replies 0 retweets 1 like
Replying to @yoshuawuyts @mgattozzi
s/meant/leaky/
7:45 AM - 28 Oct 2018
0 replies
0 retweets
1 like
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.