diff --git a/src/consensus/zmq_driver.rs b/src/consensus/zmq_driver.rs index 23a9db8e1..b89fa0a72 100644 --- a/src/consensus/zmq_driver.rs +++ b/src/consensus/zmq_driver.rs @@ -44,7 +44,7 @@ const MAX_RETRY_DELAY: Duration = Duration::from_secs(3); fn generate_correlation_id() -> String { const LENGTH: usize = 16; let mut rng = rand::thread_rng(); - [0..LENGTH] + [0; LENGTH] .iter() .map(|_| rng.sample(Alphanumeric)) .map(char::from) diff --git a/src/consensus/zmq_service.rs b/src/consensus/zmq_service.rs index 7428d14df..ea0cee013 100644 --- a/src/consensus/zmq_service.rs +++ b/src/consensus/zmq_service.rs @@ -34,7 +34,7 @@ use std::time::Duration; fn generate_correlation_id() -> String { const LENGTH: usize = 16; let mut rng = rand::thread_rng(); - [0..LENGTH] + [0; LENGTH] .iter() .map(|_| rng.sample(Alphanumeric)) .map(char::from) diff --git a/src/processor/mod.rs b/src/processor/mod.rs index 29fa8e848..1d2163f64 100644 --- a/src/processor/mod.rs +++ b/src/processor/mod.rs @@ -56,7 +56,7 @@ use self::zmq_context::ZmqTransactionContext; fn generate_correlation_id() -> String { const LENGTH: usize = 16; let mut rng = rand::thread_rng(); - [0..LENGTH] + [0; LENGTH] .iter() .map(|_| rng.sample(Alphanumeric)) .map(char::from)