Function compute_warnings

Source
pub fn compute_warnings(snapshot: &mut DebugSnapshot)
Expand description

Replaces snapshot-wide and per-node derived warning lists.

Bounds/size comparisons tolerate 0.5 logical pixels. Missing-layout nodes receive only MissingLayout because the remaining geometric checks require layout. Duplicate keys are counted globally by their exact string. Repeated calls are idempotent for unchanged snapshot inputs.

ยงExamples

use ailloli_ui_devtools_core::{compute_warnings, DebugSnapshot};
fn refresh(snapshot: &mut DebugSnapshot) {
    compute_warnings(snapshot);
    assert_eq!(snapshot.warnings.iter().filter(|w| w.node.is_none()).count(), 0);
}