From a07dc214ce72f25538eb0b86ab16b44f0422cae1 Mon Sep 17 00:00:00 2001 From: AlessandroBregoli Date: Wed, 21 Sep 2022 10:50:12 +0200 Subject: [PATCH] Clippy errors solved --- src/sampling.rs | 4 ++-- src/tools.rs | 3 --- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/sampling.rs b/src/sampling.rs index 9bbf569..19b2409 100644 --- a/src/sampling.rs +++ b/src/sampling.rs @@ -1,5 +1,5 @@ use crate::{ - network::{self, Network}, + network::{Network}, params::{self, ParamsTrait}, }; use rand::SeedableRng; @@ -22,7 +22,7 @@ where impl<'a, T: Network> ForwardSampler<'a, T> { pub fn new(net: &'a T, seed: Option) -> ForwardSampler<'a, T> { - let mut rng: ChaCha8Rng = match seed { + let rng: ChaCha8Rng = match seed { //If a seed is present use it to initialize the random generator. Some(seed) => SeedableRng::seed_from_u64(seed), //Otherwise create a new random generator using the method `from_entropy` diff --git a/src/tools.rs b/src/tools.rs index 0dfea9e..671a55a 100644 --- a/src/tools.rs +++ b/src/tools.rs @@ -1,8 +1,5 @@ use ndarray::prelude::*; -use rand_chacha::rand_core::SeedableRng; -use rand_chacha::ChaCha8Rng; -use crate::params::ParamsTrait; use crate::sampling::{Sampler, ForwardSampler}; use crate::{network, params};