]> git.lizzy.rs Git - rust.git/blobdiff - src/librand/lib.rs
auto merge of #13237 : alexcrichton/rust/private-tuple-structs, r=brson
[rust.git] / src / librand / lib.rs
index cc2051fc80b07dac3d070ca17b57d306de5c0b1a..1784349b1eb4dd993d5205676aa913843167dbdd 100644 (file)
@@ -666,7 +666,7 @@ pub fn random<T: Rand>() -> T {
 /// let Open01(val) = random::<Open01<f32>>();
 /// println!("f32 from (0,1): {}", val);
 /// ```
-pub struct Open01<F>(F);
+pub struct Open01<F>(pub F);
 
 /// A wrapper for generating floating point numbers uniformly in the
 /// closed interval `[0,1]` (including both endpoints).
@@ -682,7 +682,7 @@ pub fn random<T: Rand>() -> T {
 /// let Closed01(val) = random::<Closed01<f32>>();
 /// println!("f32 from [0,1]: {}", val);
 /// ```
-pub struct Closed01<F>(F);
+pub struct Closed01<F>(pub F);
 
 #[cfg(test)]
 mod test {