Formatting fixes to unsafe-mods.md (#283)

pull/284/head
Anatol Ulrich 3 years ago committed by GitHub
parent fa8e72298e
commit 044d36579f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -22,11 +22,12 @@ of the inner module
## Examples
* The [`toolshed`](https://docs.rs/toolshed) crate contains its unsafe operations
in submodules, presenting a safe interface to users. * `std`s `String` class
is a wrapper over `Vec<u8>` with the added invariant that the contents must be
valid UTF-8. The operations on `String` ensure this behavior. However, users
have the option of using an `unsafe` method to create a `String`, in which case
the onus is on them to guarantee the validity of the contents.
in submodules, presenting a safe interface to users.
* `std`'s `String` class is a wrapper over `Vec<u8>` with the added invariant
that the contents must be valid UTF-8. The operations on `String` ensure this
behavior.
However, users have the option of using an `unsafe` method to create a `String`,
in which case the onus is on them to guarantee the validity of the contents.
## See also

Loading…
Cancel
Save