From b495f986dc4f583b322bc78aff19fa103e6ec8ae Mon Sep 17 00:00:00 2001 From: Robert Lord Date: Fri, 25 Sep 2020 17:04:08 -0700 Subject: [PATCH] 0.4.0 --- Cargo.toml | 11 +---------- src/bin/linear_recalc.rs | 27 --------------------------- 2 files changed, 1 insertion(+), 37 deletions(-) delete mode 100644 src/bin/linear_recalc.rs diff --git a/Cargo.toml b/Cargo.toml index 59df74d..ad19716 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "anchors" -version = "0.2.0" +version = "0.4.0" authors = ["Robert Lord "] edition = "2018" description = "async incremental computations" @@ -21,12 +21,3 @@ criterion = "0.3" [[bench]] name = "benchmarks" harness = false - -[profile.release] -debug = true - -[[bin]] -name = "linear_recalc" -test = false -bench = false - diff --git a/src/bin/linear_recalc.rs b/src/bin/linear_recalc.rs deleted file mode 100644 index c418bf6..0000000 --- a/src/bin/linear_recalc.rs +++ /dev/null @@ -1,27 +0,0 @@ -use anchors::{singlethread::Engine, AnchorExt, Var}; - -fn main() { - let mut engine = Engine::new_with_max_height(1003); - let (first_num, set_first_num) = Var::new(0u64); - let mut node = first_num.cutoff(|_old_val| false); - for _ in 0..10 { - node = node.map(|val| { - println!("recalc map"); - val + 1 - }); - } - engine.mark_observed(&node); - assert_eq!(engine.get(&node), 10); - let mut update_number = 0; - - for _ in 0..5 { - update_number += 1; - println!("== setting =="); - println!("{}", engine.debug_state()); - set_first_num.set(update_number); - engine.update_dirty_marks(); - println!("== new stabilize =="); - println!("{}", engine.debug_state()); - assert_eq!(engine.get(&node), 10); - } -}