On 04-11-22, 20:33, Kent Gibson wrote:
/// Read an event stored in the buffer.
- fn event(&mut self, index: usize) -> Result<&Event> {
- fn event<'a>(&mut self, index: usize) -> Result<&'a Event> {
I tried that earlier, but then I also modified self as "&'a mut self".
if self.events[index].is_null() { // SAFETY: The `gpiod_edge_event` returned by libgpiod is guaranteed to live as long // as the `struct Event`.
Thanks.