Skip to content

Commit

Permalink
update to 2018 edition
Browse files Browse the repository at this point in the history
  • Loading branch information
ordian committed Feb 7, 2020
1 parent 6fab364 commit d478435
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ description = "Word list used to generate brain wallets for Parity."
license = "GPL-3.0"
authors = ["Parity Technologies <[email protected]>"]
repository = "https://github.com/paritytech/wordlist"
edition = "2018"

[dependencies]
lazy_static = "1.0"
rand = "0.7"

8 changes: 1 addition & 7 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,6 @@
#![warn(missing_docs)]

#[macro_use]
extern crate lazy_static;

extern crate rand;

use std::fmt;
use std::collections::HashSet;
use rand::{rngs::OsRng, seq::SliceRandom};
Expand Down Expand Up @@ -67,7 +62,7 @@ impl fmt::Display for Error {
/// 1. All the words are coming from the dictionary.
/// 2. There are at least `expected_no_of_words` in the phrase.
pub fn validate_phrase(phrase: &str, expected_no_of_words: usize) -> Result<(), Error> {
lazy_static! {
lazy_static::lazy_static! {
static ref WORD_SET: HashSet<&'static str> = WORDS.iter().cloned().collect();
}

Expand Down Expand Up @@ -111,4 +106,3 @@ mod tests {
assert_eq!(validate_phrase("xxx", 0), Err(Error::WordNotFromDictionary("xxx".into())));
}
}

0 comments on commit d478435

Please sign in to comment.