pub fn is_empty(&self) -> bool {
        self.len() == 0
    }
Resizes the `Vec` in-place so that `len` is equal to `new_len`.

If `new_len` is greater than `len`, the `Vec` is extended by the
difference, with each additional slot filled with the result of
calling the closure `f`. The return values from `f` will end up
in the `Vec` in the order they have been generated.

If `new_len` is less than `len`, the `Vec` is simply truncated.

This method uses a closure to create new values on every push. If
you'd rather [`Clone`] a given value, use [`Vec::resize`]. If you
want to use the [`Default`] trait to generate values, you can
pass [`Default::default`] as the second argument.

# Examples

```
let mut vec = vec![1, 2, 3];
vec.resize_with(5, Default::default);
assert_eq!(vec, [1, 2, 3, 0, 0]);

let mut vec = vec![];
let mut p = 1;
vec.resize_with(4, || { p *= 2; p });
assert_eq!(vec, [2, 4, 8, 16]);
benchmarks/haystacks/code/rust-library.rs