rust/hg-core/src/discovery.rs
changeset 44042 2abffea40700
parent 43826 5ac243a92e37
child 44599 d31d1c0685be
--- a/rust/hg-core/src/discovery.rs	Fri Dec 27 15:53:16 2019 -0800
+++ b/rust/hg-core/src/discovery.rs	Mon Dec 23 17:47:31 2019 +0100
@@ -18,6 +18,7 @@
 use std::collections::{HashSet, VecDeque};
 
 type Rng = rand_pcg::Pcg32;
+type Seed = [u8; 16];
 
 pub struct PartialDiscovery<G: Graph + Clone> {
     target_heads: Option<Vec<Revision>>,
@@ -158,7 +159,7 @@
         respect_size: bool,
         randomize: bool,
     ) -> Self {
-        let mut seed: [u8; 16] = [0; 16];
+        let mut seed = [0; 16];
         if randomize {
             thread_rng().fill_bytes(&mut seed);
         }
@@ -168,7 +169,7 @@
     pub fn new_with_seed(
         graph: G,
         target_heads: Vec<Revision>,
-        seed: [u8; 16],
+        seed: Seed,
         respect_size: bool,
         randomize: bool,
     ) -> Self {