From bacd99260b13deda67c49426784f3b600068c265 Mon Sep 17 00:00:00 2001 From: Greg Johnston Date: Tue, 6 Dec 2022 18:18:38 -0500 Subject: [PATCH] Fix benchmarks --- benchmarks/src/ssr.rs | 2 +- benchmarks/src/todomvc/leptos.rs | 2 +- benchmarks/src/todomvc/mod.rs | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/benchmarks/src/ssr.rs b/benchmarks/src/ssr.rs index 67aeb4d1c..3934c2d65 100644 --- a/benchmarks/src/ssr.rs +++ b/benchmarks/src/ssr.rs @@ -5,7 +5,7 @@ fn leptos_ssr_bench(b: &mut Bencher) { use leptos::*; b.iter(|| { - _ = create_scope(|cx| { + _ = create_scope(create_runtime(), |cx| { #[component] fn Counter(cx: Scope, initial: i32) -> Element { let (value, set_value) = create_signal(cx, initial); diff --git a/benchmarks/src/todomvc/leptos.rs b/benchmarks/src/todomvc/leptos.rs index 661c51b08..242cafc0d 100644 --- a/benchmarks/src/todomvc/leptos.rs +++ b/benchmarks/src/todomvc/leptos.rs @@ -115,7 +115,7 @@ pub fn TodoMVC(cx: Scope, todos: Todos) -> Element { set_mode(new_mode); }); - let add_todo = move |ev: web_sys::Event| { + let add_todo = move |ev: web_sys::KeyboardEvent| { let target = event_target::(&ev); ev.stop_propagation(); let key_code = ev.unchecked_ref::().key_code(); diff --git a/benchmarks/src/todomvc/mod.rs b/benchmarks/src/todomvc/mod.rs index 2c773e750..9835f6ce1 100644 --- a/benchmarks/src/todomvc/mod.rs +++ b/benchmarks/src/todomvc/mod.rs @@ -11,7 +11,7 @@ fn leptos_todomvc_ssr(b: &mut Bencher) { use ::leptos::*; b.iter(|| { - _ = create_scope(|cx| { + _ = create_scope(create_runtime(), |cx| { let rendered = view! { cx, @@ -63,7 +63,7 @@ fn leptos_todomvc_ssr_with_1000(b: &mut Bencher) { use ::leptos::*; b.iter(|| { - _ = create_scope(|cx| { + _ = create_scope(create_runtime(), |cx| { let rendered = view! { cx,