Skip to content

Commit

Permalink
add iter_mut() method for TestPeerList
Browse files Browse the repository at this point in the history
  • Loading branch information
Maxime2 committed Aug 9, 2019
1 parent 9a65241 commit e1dc8f1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/lib.rs
Expand Up @@ -54,7 +54,7 @@ pub mod errors;
mod tests {
use super::errors::{Error, Error::AtMaxVecCapacity, Result};
use super::Transport;
use core::slice::Iter;
use core::slice::{Iter, IterMut};
use libcommon_rs::peer::{Peer, PeerId, PeerList};
use serde::{Deserialize, Serialize};

Expand Down Expand Up @@ -97,10 +97,12 @@ mod tests {
// Stub not used in tests to satisfy PeerList trait
Ok(())
}
// type IterType<'x> = IterTestPeerList<'x, TestPeerList<Id>>;
fn iter(&self) -> Iter<'_, Self::P> {
self.peers.iter()
}
fn iter_mut(&mut self) -> IterMut<'_, Self::P> {
self.peers.iter_mut()
}
}

fn CommonTest<T: Transport<Id, Data, Error, TestPeerList<Id>>>() {}
Expand Down

0 comments on commit e1dc8f1

Please sign in to comment.