pub fn tally_votes(&self) -> (usize, usize, VoteResult) {
        // Make sure to populate granted/rejected correctly even if the votes slice
        // contains members no larger part of the configuration. This doesn't really
        // matter in the way the numbers are used (they're information), but might
        // as well get it right.
        let mut granted = 0;
        let mut rejected = 0;
        for (id, progress) in self.progress.iter() {
            if progress.is_learner {
                continue;
            }
            match self.votes.get(id) {
                Some(v) => {
                    if *v {
                        granted += 1;
                    } else {
                        rejected += 1;
                    }
                }
                None => {}
            }
        }
        let res = self.config.voters.vote_result(&self.votes);
        info!("grant: {}, rejected: {}, res: {:?}", granted, rejected, res);
        (granted, rejected, res)
    }
// returns the number of granted and rejected votes, and whether the election outcome is known
returns the number of granted and rejected votes, and whether the election outcome is known
returns the number of granted and rejected votes and whether the election outcome is known
pub fn tally_votes(&self) -> (usize, usize, VoteResult) {
        // Make sure to populate granted/rejected correctly even if the votes slice
        // contains members no larger part of the configuration. This doesn't really
        // matter in the way the numbers are used (they're information), but might
        // as well get it right.
        let mut granted = 0;
        let mut rejected = 0;
        for (id, progress) in self.progress.iter() {
            if progress.is_learner {
                continue;
            }
            match self.votes.get(id) {
                Some(v) => {
                    if *v {
                        granted += 1;
                    } else {
                        rejected += 1;
                    }
                }
                None => {}
            }
        }
        let res = self.config.voters.vote_result(&self.votes);
        info!("grant: {}, rejected: {}, res: {:?}", granted, rejected, res);
        (granted, rejected, res)
    }
pub fn tally_votes ( & self ) -> ( usize , usize , VoteResult ) { // Make sure to populate granted/rejected correctly even if the votes slice // contains members no larger part of the configuration. This doesn't really // matter in the way the numbers are used (they're information), but might // as well get it right. let mut granted = 0 ; let mut rejected = 0 ; for ( id , progress ) in self . progress . iter ( ) { if progress . is_learner { continue ; } match self . votes . get ( id ) { Some ( v ) => { if * v { granted += 1 ; } else { rejected += 1 ; } } None => { } } } let res = self . config . voters . vote_result ( & self . votes ) ; info ! ( " " granted rejected res ) ; ( granted , rejected , res ) }
returns the number of granted and rejected votes, and whether the election outcome is known
returns the number of granted and rejected votes and whether the election outcome is known
&self