Skip to content

Commit 210f16c

Browse files
committed
takes a suggestion from clippy
1 parent e9cbd79 commit 210f16c

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "phraze"
33
description = "Random passphrase generator"
4-
version = "0.3.20"
4+
version = "0.3.21"
55
edition = "2024"
66
authors = ["sts10 <[email protected]>"]
77
license = "MPL-2.0"

src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,9 +104,9 @@ pub fn generate_a_passphrase<T: AsRef<str> + std::fmt::Display>(
104104

105105
/// Given an array of words, pick a random element. Then make
106106
/// the selected word a `String` for simplicity's sake.
107-
fn get_random_element<T: AsRef<str>>(rng: &mut impl Rng, word_list: &[T]) -> String
107+
fn get_random_element<T>(rng: &mut impl Rng, word_list: &[T]) -> String
108108
where
109-
T: std::fmt::Display,
109+
T: std::fmt::Display + AsRef<str>,
110110
{
111111
match word_list.choose(rng) {
112112
Some(word) => word.to_string(),

0 commit comments

Comments
 (0)