spinoff/examples/stop_and_persist.rs

9 lines
232 B
Rust
Raw Normal View History

2022-07-16 18:33:16 -05:00
use spinoff::{Spinner, Spinners};
use std::{thread::sleep, time::Duration};
2022-07-15 12:59:22 -05:00
fn main() {
2022-07-16 18:33:16 -05:00
let sp = Spinner::new(Spinners::Dots, "Loading...", None);
2022-07-15 12:59:22 -05:00
sleep(Duration::from_secs(5));
sp.stop_and_persist("🍕", "Pizza!");
2022-07-15 12:59:22 -05:00
}