Anybody know of any good resources on when it's ok to mark @rustlang functions that use unsafe code as safe? I feel like while there's been some good highly technical analysis, there's not a ton of resources of how to think about `unsafe`.
-
-
This is a good example that I will use if I actually manage to get this blog post/these blog posts written :-P
-
Nice! -- I got this example from Boats btw, if you want to credit anyone (:
End of conversation
New conversation -
-
-
But because set_len is where the safety guarantees must be manually upheld for the *entire* structure to be correct, that's where it's marked unsafe. And even though things like reading from a vec have lots of unsafe operations inside of them, they all have a safe external API.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
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.