@@ -41,7 +41,7 @@ pub trait I2c<A: AddressMode = SevenBitAddress>: ErrorType {
4141 /// - `MAK` = master acknowledge
4242 /// - `NMAK` = master no acknowledge
4343 /// - `SP` = stop condition
44- async fn read < ' a > ( & ' a mut self , address : A , read : & ' a mut [ u8 ] ) -> Result < ( ) , Self :: Error > ;
44+ async fn read ( & mut self , address : A , read : & mut [ u8 ] ) -> Result < ( ) , Self :: Error > ;
4545
4646 /// Writes bytes to slave with address `address`
4747 ///
@@ -59,7 +59,7 @@ pub trait I2c<A: AddressMode = SevenBitAddress>: ErrorType {
5959 /// - `SAK` = slave acknowledge
6060 /// - `Bi` = ith byte of data
6161 /// - `SP` = stop condition
62- async fn write < ' a > ( & ' a mut self , address : A , write : & ' a [ u8 ] ) -> Result < ( ) , Self :: Error > ;
62+ async fn write ( & mut self , address : A , write : & [ u8 ] ) -> Result < ( ) , Self :: Error > ;
6363
6464 /// Writes bytes to slave with address `address` and then reads enough bytes to fill `read` *in a
6565 /// single transaction*.
@@ -83,11 +83,11 @@ pub trait I2c<A: AddressMode = SevenBitAddress>: ErrorType {
8383 /// - `MAK` = master acknowledge
8484 /// - `NMAK` = master no acknowledge
8585 /// - `SP` = stop condition
86- async fn write_read < ' a > (
87- & ' a mut self ,
86+ async fn write_read (
87+ & mut self ,
8888 address : A ,
89- write : & ' a [ u8 ] ,
90- read : & ' a mut [ u8 ] ,
89+ write : & [ u8 ] ,
90+ read : & mut [ u8 ] ,
9191 ) -> Result < ( ) , Self :: Error > ;
9292
9393 /// Execute the provided operations on the I2C bus as a single transaction.
@@ -103,35 +103,35 @@ pub trait I2c<A: AddressMode = SevenBitAddress>: ErrorType {
103103 /// - `SAD+R/W` = slave address followed by bit 1 to indicate reading or 0 to indicate writing
104104 /// - `SR` = repeated start condition
105105 /// - `SP` = stop condition
106- async fn transaction < ' a , ' b > (
107- & ' a mut self ,
106+ async fn transaction (
107+ & mut self ,
108108 address : A ,
109- operations : & ' a mut [ Operation < ' b > ] ,
109+ operations : & mut [ Operation < ' _ > ] ,
110110 ) -> Result < ( ) , Self :: Error > ;
111111}
112112
113113impl < A : AddressMode , T : I2c < A > > I2c < A > for & mut T {
114- async fn read < ' a > ( & ' a mut self , address : A , buffer : & ' a mut [ u8 ] ) -> Result < ( ) , Self :: Error > {
114+ async fn read ( & mut self , address : A , buffer : & mut [ u8 ] ) -> Result < ( ) , Self :: Error > {
115115 T :: read ( self , address, buffer) . await
116116 }
117117
118- async fn write < ' a > ( & ' a mut self , address : A , bytes : & ' a [ u8 ] ) -> Result < ( ) , Self :: Error > {
118+ async fn write ( & mut self , address : A , bytes : & [ u8 ] ) -> Result < ( ) , Self :: Error > {
119119 T :: write ( self , address, bytes) . await
120120 }
121121
122- async fn write_read < ' a > (
123- & ' a mut self ,
122+ async fn write_read (
123+ & mut self ,
124124 address : A ,
125- bytes : & ' a [ u8 ] ,
126- buffer : & ' a mut [ u8 ] ,
125+ bytes : & [ u8 ] ,
126+ buffer : & mut [ u8 ] ,
127127 ) -> Result < ( ) , Self :: Error > {
128128 T :: write_read ( self , address, bytes, buffer) . await
129129 }
130130
131- async fn transaction < ' a , ' b > (
132- & ' a mut self ,
131+ async fn transaction (
132+ & mut self ,
133133 address : A ,
134- operations : & ' a mut [ Operation < ' b > ] ,
134+ operations : & mut [ Operation < ' _ > ] ,
135135 ) -> Result < ( ) , Self :: Error > {
136136 T :: transaction ( self , address, operations) . await
137137 }
0 commit comments