spinoff/examples/stop_and_persist.rs

10 lines
245 B
Rust
Raw Normal View History

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