MCPcopy Create free account
hub / github.com/emberian/evdev / result_events_iter

Function result_events_iter

src/sync_stream.rs:893–905  ·  view source on GitHub ↗
(
        events: &[input_event],
    )

Source from the content-addressed store, hash-verified

891 use super::*;
892
893 fn result_events_iter(
894 events: &[input_event],
895 ) -> impl Iterator<Item = Result<input_event, ()>> + '_ {
896 let mut range = 0..0;
897 std::iter::from_fn(move || {
898 let (res, _) = sync_events(&mut range, events, |_| {});
899 match res {
900 Ok(x) => Some(Ok(x)),
901 Err(true) => Some(Err(())),
902 Err(false) => None,
903 }
904 })
905 }
906
907 fn events_iter(events: &[input_event]) -> impl Iterator<Item = input_event> + '_ {
908 result_events_iter(events).flatten()

Callers 2

events_iterFunction · 0.85
test_sync_implFunction · 0.85

Calls 1

sync_eventsFunction · 0.85

Tested by 1

test_sync_implFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…