Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/steveklabnik/ref_slice

Take a reference and get back a slice of length one
https://github.com/steveklabnik/ref_slice

Last synced: 17 days ago
JSON representation

Take a reference and get back a slice of length one

Awesome Lists containing this project

README

        

# ref\_slice

[![Documentation](https://docs.rs/ref_slice/badge.svg)](https://docs.rs/ref_slice)
[![Crates.io](https://img.shields.io/crates/v/ref_slice.svg)](https://crates.io/crates/ref_slice)

Small utility functions for getting slices of length one.

This [used to be in the standard library][ref], but was removed. So here you go!

There are also versions that work on `Option` as well.

[ref]: https://github.com/rust-lang/rust/issues/27774#issuecomment-150058618