Created
April 29, 2016 03:21
-
-
Save vadixidav/3a3c8ab449c8d9425654b3e75b49ab99 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| extern crate rand; | |
| mod text; | |
| fn main() { | |
| use rand::SeedableRng; | |
| let mut lex = text::Lexicon::new(rand::Isaac64Rng::from_seed(&[1, 2, 3, 4])); | |
| let nowhere = lex.source("nowhere".to_string()); | |
| let nobody = lex.author(nowhere.clone(), "nobody".to_string()); | |
| let message = lex.tell(nowhere.clone(), nobody, "nothing".to_string()); | |
| assert!(message.is_none()); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment