add lazy example for later
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
use std::cell::LazyCell;
|
||||
use std::sync::LazyLock;
|
||||
use std::thread::sleep;
|
||||
use std::time::Duration;
|
||||
|
||||
@@ -8,6 +10,11 @@ use crate::action::StartFields;
|
||||
use crate::multibar::MultiBar;
|
||||
use crate::state_manager::{BuildEnumState, BuildState, State, StateManager};
|
||||
|
||||
static LAZY: LazyLock<i32> = LazyLock::new(|| {
|
||||
println!("initializing");
|
||||
92
|
||||
});
|
||||
|
||||
pub mod action;
|
||||
pub mod action_raw;
|
||||
pub mod multibar;
|
||||
@@ -64,7 +71,7 @@ impl TermLike for TextTerm {
|
||||
|
||||
fn main() -> Result<(), color_eyre::Report> {
|
||||
color_eyre::install().unwrap();
|
||||
|
||||
println!("Lazy value: {}", *LAZY);
|
||||
// let pb = ProgressBar::new(100);
|
||||
// pb.set_draw_target(indicatif::ProgressDrawTarget::term_like(Box::new(TextTerm)));
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user