You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This doesn't properly encapsulate the private type inside, since client code can dereference the TcpStream to get at it. According to #5489, newtype structs aren't intended to be able to hide their internals. The easiest solution is to probably switch to single-element structs, e.g.:
add new lint `seek_to_start_instead_of_rewind `
changelog: `seek_to_start_instead_of_rewind`: new lint to suggest using `rewind` instead of `seek` to start
Resolverust-lang#8600
std::rt
uses this a lot, for example:This doesn't properly encapsulate the private type inside, since client code can dereference the
TcpStream
to get at it. According to #5489, newtype structs aren't intended to be able to hide their internals. The easiest solution is to probably switch to single-element structs, e.g.:The text was updated successfully, but these errors were encountered: