ah right suddenly clicked why a function has to be `(&self) -> Option<&T>`, and not return `Option<T>`, if `T` is part of `self`
-
Show this thread
-
starting at this `match self` code for 10 minutes going "but `self` contains a T not a &T what is going on"
1 reply 0 retweets 0 likesShow this thread -
I'm not owned
1 reply 0 retweets 3 likesShow this thread -
oh is this why match ergonomics are a thing? I did not understand that on first read-through
2 replies 0 retweets 2 likesShow this thread -
Replying to @mountain_ghosts
https://github.com/diesel-rs/diesel/pull/1578/files … was a before/after of the feature when it was still theoretical. Take from it what you will.
1 reply 0 retweets 0 likes
Replying to @sgrif @mountain_ghosts
It's nice in the places it let me remove `ref`s that I didn't care about and it knew I meant anyway. It's confusing in places its used to implicitly return a ref
1:06 PM - 20 Mar 2019
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.