fix js framework benchmark

This commit is contained in:
Evan Almloff committed 2024-01-22 08:36:17 -06:00
1 parent a10f9496c7
commit 74ec3a4a82
2 files changed
+4 -4

No files matched your search

+2 -2
View File
@@ -19,6 +19,7 @@
use criterion::{criterion_group, criterion_main, Criterion};
use dioxus::prelude::*;
use dioxus_core::NoOpMutations;
use rand::prelude::*;
criterion_group!(mbenches, create_rows);
@@ -30,8 +31,7 @@ fn create_rows(c: &mut Criterion) {
let _ = dom.rebuild(&mut dioxus_core::NoOpMutations);
b.iter(|| {
let g = dom.rebuild(&mut ());
assert!(g.edits.len() > 1);
dom.rebuild(&mut NoOpMutations);
})
});
}
+2 -2
View File
@@ -170,13 +170,13 @@ pub fn launch(app: fn() -> Element) {
LaunchBuilder::new().launch(app)
}
#[cfg(all(feature = "web"))]
#[cfg(feature = "web")]
/// Launch your web application without any additional configuration. See [`LaunchBuilder`] for more options.
pub fn launch_web(app: fn() -> Element) {
LaunchBuilder::web().launch(app)
}
#[cfg(all(feature = "desktop"))]
#[cfg(feature = "desktop")]
/// Launch your desktop application without any additional configuration. See [`LaunchBuilder`] for more options.
pub fn launch_desktop(app: fn() -> Element) {
LaunchBuilder::desktop().launch(app)