rusty-diceware

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 70096f952572c48e1e13b5cb1da3a6b66d34b5eb
parent f09ffe254bb79958079a3605228ee4209126026b
Author: Yuval Langer <yuval.langer@gmail.com>
Date:   Fri, 12 Jun 2015 23:26:13 +0300

Making the contents of the BealeWord and ReinholdWord structs private

Diffstat:
Msrc/main.rs | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/main.rs b/src/main.rs @@ -17,10 +17,10 @@ mod diceware { include!(concat!(env!("OUT_DIR"), "/diceware.rs")); #[derive(Debug,Clone)] - pub struct BealeWord(pub &'static str); + pub struct BealeWord(&'static str); #[derive(Debug,Clone)] - pub struct ReinholdWord(pub &'static str); + pub struct ReinholdWord(&'static str); impl rand::Rand for BealeWord { fn rand<R: rand::Rng>(rng: &mut R) -> BealeWord { @@ -105,7 +105,7 @@ fn main() { */ let mut rng = rand::OsRng::new().unwrap(); for _ in 1..8 { - let diceware::BealeWord(word) = rng.gen(); + let word: diceware::BealeWord = rng.gen(); print!("{} ", word); } println!("");