aboutsummaryrefslogtreecommitdiff
path: root/embassy-nrf/src/uarte.rs
diff options
context:
space:
mode:
authorUlf Lilleengen <[email protected]>2021-12-16 11:37:53 +0100
committerUlf Lilleengen <[email protected]>2021-12-16 11:37:53 +0100
commit2bbd1ddb8a0e36e91a2b328024f313b780b1b851 (patch)
tree4e41c56f0032f811faac07bc98f93b522ea2e1f3 /embassy-nrf/src/uarte.rs
parent985c11fad5d666485b809b846d294a1a2492b370 (diff)
Remove unneeded rustfmt::skip
Diffstat (limited to 'embassy-nrf/src/uarte.rs')
-rw-r--r--embassy-nrf/src/uarte.rs42
1 files changed, 28 insertions, 14 deletions
diff --git a/embassy-nrf/src/uarte.rs b/embassy-nrf/src/uarte.rs
index 17417c0e2..777948198 100644
--- a/embassy-nrf/src/uarte.rs
+++ b/embassy-nrf/src/uarte.rs
@@ -167,8 +167,10 @@ impl<'d, T: Instance> Uarte<'d, T> {
167} 167}
168 168
169impl<'d, T: Instance> Read for Uarte<'d, T> { 169impl<'d, T: Instance> Read for Uarte<'d, T> {
170 #[rustfmt::skip] 170 type ReadFuture<'a>
171 type ReadFuture<'a> where Self: 'a = impl Future<Output = Result<(), TraitError>> + 'a; 171 where
172 Self: 'a,
173 = impl Future<Output = Result<(), TraitError>> + 'a;
172 174
173 fn read<'a>(&'a mut self, rx_buffer: &'a mut [u8]) -> Self::ReadFuture<'a> { 175 fn read<'a>(&'a mut self, rx_buffer: &'a mut [u8]) -> Self::ReadFuture<'a> {
174 self.rx.read(rx_buffer) 176 self.rx.read(rx_buffer)
@@ -176,8 +178,10 @@ impl<'d, T: Instance> Read for Uarte<'d, T> {
176} 178}
177 179
178impl<'d, T: Instance> Write for Uarte<'d, T> { 180impl<'d, T: Instance> Write for Uarte<'d, T> {
179 #[rustfmt::skip] 181 type WriteFuture<'a>
180 type WriteFuture<'a> where Self: 'a = impl Future<Output = Result<(), TraitError>> + 'a; 182 where
183 Self: 'a,
184 = impl Future<Output = Result<(), TraitError>> + 'a;
181 185
182 fn write<'a>(&'a mut self, tx_buffer: &'a [u8]) -> Self::WriteFuture<'a> { 186 fn write<'a>(&'a mut self, tx_buffer: &'a [u8]) -> Self::WriteFuture<'a> {
183 self.tx.write(tx_buffer) 187 self.tx.write(tx_buffer)
@@ -193,8 +197,10 @@ impl<'d, T: Instance> UarteTx<'d, T> {
193} 197}
194 198
195impl<'d, T: Instance> Write for UarteTx<'d, T> { 199impl<'d, T: Instance> Write for UarteTx<'d, T> {
196 #[rustfmt::skip] 200 type WriteFuture<'a>
197 type WriteFuture<'a> where Self: 'a = impl Future<Output = Result<(), TraitError>> + 'a; 201 where
202 Self: 'a,
203 = impl Future<Output = Result<(), TraitError>> + 'a;
198 204
199 fn write<'a>(&'a mut self, tx_buffer: &'a [u8]) -> Self::WriteFuture<'a> { 205 fn write<'a>(&'a mut self, tx_buffer: &'a [u8]) -> Self::WriteFuture<'a> {
200 async move { 206 async move {
@@ -274,8 +280,10 @@ impl<'d, T: Instance> UarteRx<'d, T> {
274} 280}
275 281
276impl<'d, T: Instance> Read for UarteRx<'d, T> { 282impl<'d, T: Instance> Read for UarteRx<'d, T> {
277 #[rustfmt::skip] 283 type ReadFuture<'a>
278 type ReadFuture<'a> where Self: 'a = impl Future<Output = Result<(), TraitError>> + 'a; 284 where
285 Self: 'a,
286 = impl Future<Output = Result<(), TraitError>> + 'a;
279 287
280 fn read<'a>(&'a mut self, rx_buffer: &'a mut [u8]) -> Self::ReadFuture<'a> { 288 fn read<'a>(&'a mut self, rx_buffer: &'a mut [u8]) -> Self::ReadFuture<'a> {
281 async move { 289 async move {
@@ -490,8 +498,10 @@ impl<'d, U: Instance, T: TimerInstance> UarteWithIdle<'d, U, T> {
490} 498}
491 499
492impl<'d, U: Instance, T: TimerInstance> ReadUntilIdle for UarteWithIdle<'d, U, T> { 500impl<'d, U: Instance, T: TimerInstance> ReadUntilIdle for UarteWithIdle<'d, U, T> {
493 #[rustfmt::skip] 501 type ReadUntilIdleFuture<'a>
494 type ReadUntilIdleFuture<'a> where Self: 'a = impl Future<Output = Result<usize, TraitError>> + 'a; 502 where
503 Self: 'a,
504 = impl Future<Output = Result<usize, TraitError>> + 'a;
495 fn read_until_idle<'a>(&'a mut self, rx_buffer: &'a mut [u8]) -> Self::ReadUntilIdleFuture<'a> { 505 fn read_until_idle<'a>(&'a mut self, rx_buffer: &'a mut [u8]) -> Self::ReadUntilIdleFuture<'a> {
496 async move { 506 async move {
497 let ptr = rx_buffer.as_ptr(); 507 let ptr = rx_buffer.as_ptr();
@@ -550,8 +560,10 @@ impl<'d, U: Instance, T: TimerInstance> ReadUntilIdle for UarteWithIdle<'d, U, T
550} 560}
551 561
552impl<'d, U: Instance, T: TimerInstance> Read for UarteWithIdle<'d, U, T> { 562impl<'d, U: Instance, T: TimerInstance> Read for UarteWithIdle<'d, U, T> {
553 #[rustfmt::skip] 563 type ReadFuture<'a>
554 type ReadFuture<'a> where Self: 'a = impl Future<Output = Result<(), TraitError>> + 'a; 564 where
565 Self: 'a,
566 = impl Future<Output = Result<(), TraitError>> + 'a;
555 fn read<'a>(&'a mut self, rx_buffer: &'a mut [u8]) -> Self::ReadFuture<'a> { 567 fn read<'a>(&'a mut self, rx_buffer: &'a mut [u8]) -> Self::ReadFuture<'a> {
556 async move { 568 async move {
557 self.ppi_ch1.disable(); 569 self.ppi_ch1.disable();
@@ -563,8 +575,10 @@ impl<'d, U: Instance, T: TimerInstance> Read for UarteWithIdle<'d, U, T> {
563} 575}
564 576
565impl<'d, U: Instance, T: TimerInstance> Write for UarteWithIdle<'d, U, T> { 577impl<'d, U: Instance, T: TimerInstance> Write for UarteWithIdle<'d, U, T> {
566 #[rustfmt::skip] 578 type WriteFuture<'a>
567 type WriteFuture<'a> where Self: 'a = impl Future<Output = Result<(), TraitError>> + 'a; 579 where
580 Self: 'a,
581 = impl Future<Output = Result<(), TraitError>> + 'a;
568 582
569 fn write<'a>(&'a mut self, tx_buffer: &'a [u8]) -> Self::WriteFuture<'a> { 583 fn write<'a>(&'a mut self, tx_buffer: &'a [u8]) -> Self::WriteFuture<'a> {
570 self.uarte.write(tx_buffer) 584 self.uarte.write(tx_buffer)