Skip to content

Commit 87c90e5

Browse files
committed
fix: better example
1 parent 06206c0 commit 87c90e5

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/lib.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,13 @@
55
//! # Example
66
//! ```
77
//! # tokio::runtime::Runtime::new().unwrap().block_on (async {
8-
//! use lazy_futuristic::{Lazy, ValueOrSetter};
8+
//! use lazy_futuristic::Lazy;
9+
//! use lazy_futuristic::ValueOrSetter::*;
910
//!
1011
//! let lazy_number: Lazy<i32> = Lazy::new();
1112
//! let number = match lazy_number.get_or_set().await {
12-
//! ValueOrSetter::Value(value) => value,
13-
//! ValueOrSetter::Setter(setter) => setter.set(10),
13+
//! Value(value) => value,
14+
//! Setter(setter) => setter.set(10),
1415
//! };
1516
//!
1617
//! assert_eq!(*number, 10);

0 commit comments

Comments
 (0)