about to try channels

This commit is contained in:
bel
2020-05-02 14:13:56 -06:00
parent cd841f38eb
commit 74b2c36acf
4 changed files with 56 additions and 0 deletions

View File

@@ -3,6 +3,7 @@ use super::event::Event;
use rand::{self, Rng};
use rand::distributions::Alphanumeric;
use crossbeam_channel::{unbounded, Receiver, Sender};
#[derive(Clone, Debug)]
pub struct MockRoom {
@@ -60,6 +61,12 @@ impl Room for MockRoom {
}
}
impl Drop for MockRoom {
fn drop(&mut self) {
println!("not impl");
}
}
pub fn rands() -> String {
rand::thread_rng()
.sample_iter(&Alphanumeric)