aboutsummaryrefslogtreecommitdiff
path: root/examples/password.rs
blob: 7504bdd9c4e7586772c24a06a3476525c3782965 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// Copyright (C) 2019 Robin Krahl <robin.krahl@ireas.org>
// SPDX-License-Identifier: MIT

use dialog::DialogBox;

fn main() -> dialog::Result<()> {
    let password = dialog::Password::new("Please enter a new password")
        .title("Password")
        .show()?;
    match password {
        Some(password) => println!("Your new password is: {}", password),
        None => println!("You do not want to have a password."),
    };
    Ok(())
}