Skip to content

Commit ad8410e

Browse files
authored
Merge pull request #625 from mandeep/add-basic-usage
Add comments in basic usage block
2 parents fbd9ec3 + 8923d7b commit ad8410e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@
1818
//! a random value is to use [`random()`].
1919
//!
2020
//! ```
21-
//! let x: u8 = rand::random();
21+
//! let x: u8 = rand::random(); // generates an integer within u8 bounds
2222
//! println!("{}", x);
2323
//!
24-
//! let y = rand::random::<f64>();
24+
//! let y = rand::random::<f64>(); // generates a float between 0 and 1
2525
//! println!("{}", y);
2626
//!
2727
//! if rand::random() { // generates a boolean

0 commit comments

Comments
 (0)