| ▲ | mgaunard 3 days ago | ||||||||||||||||||||||||||||||||||
members of a const struct are also const. Now you obviously can still have escape hatches and cast the const away whenever you want. | |||||||||||||||||||||||||||||||||||
| ▲ | wtetzner 2 days ago | parent [-] | ||||||||||||||||||||||||||||||||||
> members of a const struct are also const. Yes, but if your struct contains references, the constness doesn't apply to what those references point to. In Rust it does. | |||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||