@hdevalence Yes, you are missing that the purpose of `Into` is to replace the value of the old type with the new value, not create a copy.
-
-
ahhhhhhhhhh okay, that makes more sense now, thank you very much
-
Incidentally, if you're doing what I imagine you're doing then you can actually do it as `fn as_bytes(&'a self) -> &'a [u8]`
End of conversation
New conversation -
-
-
So, there is no "To" trait corresponding to From, because you are supposed to just write it as From every time?
-
IDK why there isn't a `To` trait. TBH `From`/`Into`/`TryFrom`/`TryInto` is not my favorite design and I often just avoid them.
-
thanks for the tip about the naming, though, that makes a lot of things make a lot more sense.
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.