ref_slice
Small utility functions for getting slices of length one.
This used to be in the standard library, but was removed. So here you go!
There are also versions that work on Option<T>
as well.
Turn a reference into a slice of length one.
Homepage Cargo Rust Documentation Download
Small utility functions for getting slices of length one.
This used to be in the standard library, but was removed. So here you go!
There are also versions that work on Option<T>
as well.