Comment

Comment by sophacles

How would it be possible to make it safe? The compiler can't verify that N random bytes input from an arbitrary source are going to be valid for the types in the struct - you have to tell tell the compiler "trust this even if you can't verify it from the source code" - hence the unsafe keyword.
parent sophacles 5 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton