src/main.rs aktualisiert
This commit is contained in:
parent
7b47cdc1a6
commit
147add5654
|
@ -22,7 +22,7 @@ fn start() {
|
||||||
println!("Hello what is your Name?");
|
println!("Hello what is your Name?");
|
||||||
let mut name = String::new();
|
let mut name = String::new();
|
||||||
io::stdin().read_line(&mut name).expect("error");
|
io::stdin().read_line(&mut name).expect("error");
|
||||||
if name.is_empty() == true{
|
if name.trim.is_empty() == true{
|
||||||
invalid_input(3)
|
invalid_input(3)
|
||||||
}else {
|
}else {
|
||||||
println!("Hello {}", name);
|
println!("Hello {}", name);
|
||||||
|
|
Loading…
Reference in a new issue