fn random_staked_neuron(&self, rng: &mut StdRng) -> Option<Neuron> {
        let staked_neurons = self
            .neurons
            .values()
            .filter(|n| n.id_in_governance.is_some())
            .collect::<Vec<&Neuron>>();
        let len = staked_neurons.len();
        if len > 0 {
            return Some((*staked_neurons.get(rng.gen_range(0, len)).unwrap()).clone());
        }
        None
    }
/// Chooses a random staked Neuron (i.e. a neuron we can call NeuronDisburse
/// on).
Chooses a random staked Neuron .
Chooses a random staked Neuron .
fn random_staked_neuron(&self, rng: &mut StdRng) -> Option<Neuron> {
        let staked_neurons = self
            .neurons
            .values()
            .filter(|n| n.id_in_governance.is_some())
            .collect::<Vec<&Neuron>>();
        let len = staked_neurons.len();
        if len > 0 {
            return Some((*staked_neurons.get(rng.gen_range(0, len)).unwrap()).clone());
        }
        None
    }
fn random_staked_neuron ( & self , rng : & mut StdRng ) -> Option < Neuron > { let staked_neurons = self . neurons . values ( ) . filter ( | n | n . id_in_governance . is_some ( ) ) . collect :: < Vec < & Neuron > > ( ) ; let len = staked_neurons . len ( ) ; if len > 0 { return Some ( ( * staked_neurons . get ( rng . gen_range ( 0 , len ) ) . unwrap ( ) ) . clone ( ) ) ; } None }
Chooses a random staked Neuron (i.e.
Chooses a random staked Neuron ( i . e .
&self
rng
&mut StdRng
&self
rng
&mut StdRng