fix clippy lint

This commit is contained in:
Brendan Hansknecht 2021-10-29 16:03:49 -07:00
parent 9798a27606
commit d21c858ccd

View file

@ -199,7 +199,7 @@ impl<T> RocList<T> {
T: Clone,
{
// Avoid allocation with empty list.
if slice.len() == 0 {
if slice.is_empty() {
Self::default()
} else {
Self::from_slice_with_capacity(slice, slice.len())