Pass &[E] into Vector::write() instead of &Vec<E>

This commit is contained in:
Jack Grigg 2018-11-16 08:55:06 +00:00
parent cc183efda4
commit 2d2e4aad86
No known key found for this signature in database
GPG Key ID: 1B8D649257DB0829
1 changed files with 1 additions and 1 deletions

View File

@ -73,7 +73,7 @@ impl Vector {
(0..count).into_iter().map(|_| func(&mut reader)).collect() (0..count).into_iter().map(|_| func(&mut reader)).collect()
} }
pub fn write<W: Write, E, F>(mut writer: W, vec: &Vec<E>, func: F) -> io::Result<()> pub fn write<W: Write, E, F>(mut writer: W, vec: &[E], func: F) -> io::Result<()>
where where
F: Fn(&mut W, &E) -> io::Result<()>, F: Fn(&mut W, &E) -> io::Result<()>,
{ {