summaryrefslogtreecommitdiffstats
path: root/src/util.rs
blob: fcb4432d839f300ecefe9d885d8d6eddbdeed5c1 (plain)
1
2
3
4
5
6
7
8
9
10
11
use cursive::views::Dialog;
use cursive::views::TextView;

pub fn dialog_for<S: ToString>(e: S) -> Dialog {
    Dialog::around({
        TextView::new(e.to_string())
    })
    .button("Ok", |s| {
        s.pop_layer();
    })
}