Memoized views: rustfmt

This commit is contained in:
aiongg
2026-11-21 03:20:37 +00:00
parent 5734238622
commit d37c886c2d
2 changed files with 2 additions and 3 deletions
+1 -2
View File
@@ -564,8 +564,7 @@ fn moved(ctx: &Context, settled: &Settled, view: Option<(Option<View>, Option<Vi
fn engaged(ctx: &Context, layer: Layer, rect: Rect) -> bool {
let screen = ctx.layer_transform_to_global(layer).map_or(rect, |transform| transform * rect);
ctx.rect_contains_pointer(layer, rect)
|| input_state::held_press_origin(ctx)
.is_some_and(|origin| screen.contains(origin) && ctx.layer_id_at(origin) == Some(layer))
|| input_state::held_press_origin(ctx).is_some_and(|origin| screen.contains(origin) && ctx.layer_id_at(origin) == Some(layer))
}
/// Adds the last real run of the memoized view `id` to the running pass, in place of running it, at the place `shift`
+1 -1
View File
@@ -7,12 +7,12 @@ use craft_ui::choice::Checkbox;
use craft_ui::contract::{Bind, MemoProps, MemoView, Props as _, Show as _, ShowContainer as _, Tracked};
use craft_ui::display::Text;
use craft_ui::layout_components::{Row, Stack};
use craft_ui::popover::Popover;
use craft_ui::runtime::env::{BodyMode, RevealEdge, ShellCx, WindowKey};
use craft_ui::runtime::memory::{SaveKey, set_saved_value};
use craft_ui::runtime::{frame, inspect};
use craft_ui::testing::in_audit_run;
use craft_ui::testing::input::key_press;
use craft_ui::popover::Popover;
use craft_ui::testing::layout::{allocate, in_region, measured_block};
use craft_ui::testing::pointer::{moved, press, release};
use craft_ui::testing::{