Skip to content

Commit

Permalink
Add is_strong, mind variable names
Browse files Browse the repository at this point in the history
  • Loading branch information
barabadzhi committed Mar 25, 2018
1 parent 29df049 commit 3a4060a
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
6 changes: 6 additions & 0 deletions is-strong/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[package]
name = "is-strong"
version = "0.1.0"
authors = ["Bogdan Arabadzhi <[email protected]>"]

[dependencies]
10 changes: 10 additions & 0 deletions is-strong/src/main.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
fn main() {
let pw = "justok";
let is_strong = is_strong(pw);

println!("Is strong? {}", is_strong)
}

fn is_strong<T: Into<String>>(password: T) -> bool {
password.into().len() > 5
}

0 comments on commit 3a4060a

Please sign in to comment.