Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ keywords = [
]

[dependencies]
rand = "0.9"
rand = "0.10"
2 changes: 1 addition & 1 deletion src/default.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ mod tests {
pub fn default() {
use crate::Gab;
use rand::rng;
use rand::Rng;
use rand::RngExt;
let mut rng = rng();
let gib: Gab = rng.random();
assert!(!gib.is_empty());
Expand Down
4 changes: 2 additions & 2 deletions src/gabble.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ use crate::Syllable::{self, *};
/// ```
/// use gabble::Gabble;
/// use gabble::Syllable::{Alphabet, Consonant};
/// use rand::thread_rng;
/// let mut rng = thread_rng();
/// use rand::rng;
/// let mut rng = rng();
/// //Generator configured to generate words
/// //that starts with consonant syllable and ends with a number
/// let gabble = Gabble::new()
Expand Down
1 change: 1 addition & 0 deletions src/generator.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
use crate::Syllable;
use crate::{FINALS, INITIALS, VOWELS};
use rand::seq::IndexedRandom;
use rand::RngExt;

pub fn generate<R: rand::Rng + ?Sized>(
rng: &mut R,
Expand Down
2 changes: 1 addition & 1 deletion src/length.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ mod tests {
pub fn gablength() {
use crate::GabLength;
use rand::rng;
use rand::Rng;
use rand::RngExt;
let mut rng = rng();
let gib: GabLength<4> = rng.random();
assert!(!gib.is_empty());
Expand Down
5 changes: 3 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Gabble provides type [`Gab`] and [`GabLength`] that represents a random pseudo-w
These types implement [`Distribution`](rand::distributions) trait which means they can be generated in an idomatic way by using method from [`rand::Rng`] such as [`gen()`](rand::Rng::gen()).
### Example
``` rust
use rand::{rng, Rng};
use rand::{rng, RngExt};
let mut rng = rng();

// `Gab` gives gibberish of some moderate length
Expand Down Expand Up @@ -49,5 +49,6 @@ mod syllables;

pub use crate::default::Gab;
pub use crate::gabble::Gabble;
pub use crate::length::GabLength;pub use crate::syllables::Syllable;
pub use crate::length::GabLength;
pub use crate::syllables::Syllable;
use crate::syllables::{FINALS, INITIALS, VOWELS};