From 2d2e4aad86f0e9308bf9638c811743816d39ab98 Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Fri, 16 Nov 2018 08:55:06 +0000 Subject: [PATCH] Pass &[E] into Vector::write() instead of &Vec --- zcash_primitives/src/serialize.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zcash_primitives/src/serialize.rs b/zcash_primitives/src/serialize.rs index 81d600964..f1429438e 100644 --- a/zcash_primitives/src/serialize.rs +++ b/zcash_primitives/src/serialize.rs @@ -73,7 +73,7 @@ impl Vector { (0..count).into_iter().map(|_| func(&mut reader)).collect() } - pub fn write(mut writer: W, vec: &Vec, func: F) -> io::Result<()> + pub fn write(mut writer: W, vec: &[E], func: F) -> io::Result<()> where F: Fn(&mut W, &E) -> io::Result<()>, {