Re: [libgpiod v2][PATCH V8 9/9] bindings: rust: Implement iterator for edge events

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

-- 
viresh



[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux