chore(repo): prune dead code and duplicate abstractions (#3413)

This commit is contained in:
Hampus authored and GitHub committed 2026-10-12 13:09:42 +02:00
1 parent c17091768c
commit c9fdf8fead
2937 files changed
+42233 -176793

No files matched your search

@@ -501,43 +501,3 @@ impl EventDispatcher {
pub fn has_accessibility_permission() -> bool {
objc2_core_graphics::CGPreflightListenEventAccess()
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn held_inputs_release_every_pressed_key_and_button_once() {
let mods = modifiers::from_flags(0);
let mut held = HeldInputs::default();
held.track(&key_payload(InputEventKind::KeyDown, 0x31, mods));
held.track(&key_payload(InputEventKind::KeyDown, 0x3b, mods));
held.track(&key_payload(InputEventKind::KeyDown, 0x00, mods));
held.track(&key_payload(InputEventKind::KeyUp, 0x00, mods));
held.track(&InputEventPayload {
kind: InputEventKind::MouseDown,
mods,
keycode: 0,
key_name: String::new(),
button: 3,
x: 0,
y: 0,
has_xy: true,
});
let releases = held.take_releases();
let summary: Vec<(InputEventKind, u32, u8)> = releases
.iter()
.map(|payload| (payload.kind, payload.keycode, payload.button))
.collect();
assert_eq!(
summary,
vec![
(InputEventKind::KeyUp, 0x31, 0),
(InputEventKind::KeyUp, 0x3b, 0),
(InputEventKind::MouseUp, 0, 3),
]
);
assert!(releases.iter().all(|payload| !payload.mods.ctrl));
assert!(held.take_releases().is_empty());
}
}