This is generically better, but it may run into some annoying lifetime problems.
And example error:
warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do
--> src/tensor/tensor_like.rs:27:26
|
27 | fn get(&self, index: &Vec<usize>) -> Result<&Self::Elem, String>;
| ^^^^^^^^^^^ help: change this to: `&[usize]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg
= note: `#[warn(clippy::ptr_arg)]` on by default
This is generically better, but it may run into some annoying lifetime problems. And example error: