spinoff/examples/stop_and_persist.rs
2022-07-16 17:33:16 -06:00

9 lines
232 B
Rust

use spinoff::{Spinner, Spinners};
use std::{thread::sleep, time::Duration};
fn main() {
let sp = Spinner::new(Spinners::Dots, "Loading...", None);
sleep(Duration::from_secs(5));
sp.stop_and_persist("🍕", "Pizza!");
}