use slice for option_vec_printer

This commit is contained in:
Simon Gardling 2022-04-07 10:35:27 -04:00
parent 3521ff3a13
commit 95fb39715f

View File

@ -300,7 +300,7 @@ fn newtons_method(
} }
/// Inputs `Vec<Option<T>>` and outputs a `String` containing a pretty representation of the Vector /// Inputs `Vec<Option<T>>` and outputs a `String` containing a pretty representation of the Vector
pub fn option_vec_printer<T: ToString>(data: &Vec<Option<T>>) -> String pub fn option_vec_printer<T: ToString>(data: &[Option<T>]) -> String
where where
T: ToString, T: ToString,
{ {