diff --git a/zcash_history/examples/long.rs b/zcash_history/examples/long.rs index a2b2b9077..bcd8d39f0 100644 --- a/zcash_history/examples/long.rs +++ b/zcash_history/examples/long.rs @@ -3,7 +3,7 @@ use zcash_history::{Entry, EntryLink, NodeData, Tree}; #[path = "lib/shared.rs"] mod share; -fn draft(into: &mut Vec<(u32, Entry)>, vec: &Vec, peak_pos: usize, h: u32) { +fn draft(into: &mut Vec<(u32, Entry)>, vec: &[NodeData], peak_pos: usize, h: u32) { let node_data = vec[peak_pos - 1].clone(); let peak: Entry = match h { 0 => node_data.into(), @@ -19,7 +19,7 @@ fn draft(into: &mut Vec<(u32, Entry)>, vec: &Vec, peak_pos: usize, h: into.push(((peak_pos - 1) as u32, peak)); } -fn prepare_tree(vec: &Vec) -> Tree { +fn prepare_tree(vec: &[NodeData]) -> Tree { assert!(!vec.is_empty()); // integer log2 of (vec.len()+1), -1