From 7512dbcc09faa58344a5058baab8826a0e0d0160 Mon Sep 17 00:00:00 2001 From: Diego Barrios Romero Date: Thu, 18 Jun 2020 14:06:51 +0200 Subject: [PATCH] Update to new function prototype --- src/lib.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index e2d579c..b4b4726 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -211,10 +211,11 @@ impl hal::blocking::i2c::WriteRead for I2cdev { impl hal::blocking::i2c::Transactional for I2cdev { type Error = i2cdev::linux::LinuxI2CError; - fn try_exec<'a, O>(&mut self, address: u8, mut operations: O) -> Result<(), Self::Error> - where - O: AsMut<[I2cOperation<'a>]>, - { + fn try_exec<'a>( + &mut self, + address: u8, + operations: &mut [I2cOperation<'a>], + ) -> Result<(), Self::Error> { // Map operations from generic to linux objects let mut messages: Vec<_> = operations .as_mut()