Conversation

Wow this is a super nice #Rust error. It's suggesting to wrap the value in a variant of an enum that can hold values of that type. (The suggestion is the correct too)
Screenshot of a Rust error where it suggests wrapping a value in a variatn of an enum due to a type mistmatch. That variant of the enum holds value of the type of the mismatched value.
4
65
Replying to and
This has limitations, it's a heuristic. It only works when there's a variant with a single field of the type that was found, but in practice it works more often than you'd expect and when it does it's just magical 😍 And when it doesn't you don't know what you're missing 👀
1
4
Yeah I can definitely see how it could go awry. It definitely favors using more precise types, which I think I can get behind (within reason) 😊
1
1
Show replies