diff options
| author | Ulf Lilleengen <[email protected]> | 2021-12-16 11:37:53 +0100 |
|---|---|---|
| committer | Ulf Lilleengen <[email protected]> | 2021-12-16 11:37:53 +0100 |
| commit | 2bbd1ddb8a0e36e91a2b328024f313b780b1b851 (patch) | |
| tree | 4e41c56f0032f811faac07bc98f93b522ea2e1f3 /embassy-stm32 | |
| parent | 985c11fad5d666485b809b846d294a1a2492b370 (diff) | |
Remove unneeded rustfmt::skip
Diffstat (limited to 'embassy-stm32')
| -rw-r--r-- | embassy-stm32/src/i2c/v2.rs | 27 | ||||
| -rw-r--r-- | embassy-stm32/src/rng.rs | 6 | ||||
| -rw-r--r-- | embassy-stm32/src/sdmmc/v2.rs | 12 | ||||
| -rw-r--r-- | embassy-stm32/src/spi/mod.rs | 18 | ||||
| -rw-r--r-- | embassy-stm32/src/usart/mod.rs | 12 |
5 files changed, 53 insertions, 22 deletions
diff --git a/embassy-stm32/src/i2c/v2.rs b/embassy-stm32/src/i2c/v2.rs index 94c4d9a7c..73b6f5517 100644 --- a/embassy-stm32/src/i2c/v2.rs +++ b/embassy-stm32/src/i2c/v2.rs | |||
| @@ -858,12 +858,27 @@ impl<'d, T: Instance, TXDMA: super::TxDma<T>, RXDMA: super::RxDma<T>> I2cTrait<u | |||
| 858 | { | 858 | { |
| 859 | type Error = super::Error; | 859 | type Error = super::Error; |
| 860 | 860 | ||
| 861 | #[rustfmt::skip] | 861 | type WriteFuture<'a> |
| 862 | type WriteFuture<'a> where 'd: 'a, T: 'a, TXDMA: 'a, RXDMA: 'a = impl Future<Output = Result<(), Self::Error>> + 'a; | 862 | where |
| 863 | #[rustfmt::skip] | 863 | 'd: 'a, |
| 864 | type ReadFuture<'a> where 'd: 'a, T: 'a, TXDMA: 'a, RXDMA: 'a = impl Future<Output = Result<(), Self::Error>> + 'a; | 864 | T: 'a, |
| 865 | #[rustfmt::skip] | 865 | TXDMA: 'a, |
| 866 | type WriteReadFuture<'a> where 'd: 'a, T: 'a, TXDMA: 'a, RXDMA: 'a = impl Future<Output = Result<(), Self::Error>> + 'a; | 866 | RXDMA: 'a, |
| 867 | = impl Future<Output = Result<(), Self::Error>> + 'a; | ||
| 868 | type ReadFuture<'a> | ||
| 869 | where | ||
| 870 | 'd: 'a, | ||
| 871 | T: 'a, | ||
| 872 | TXDMA: 'a, | ||
| 873 | RXDMA: 'a, | ||
| 874 | = impl Future<Output = Result<(), Self::Error>> + 'a; | ||
| 875 | type WriteReadFuture<'a> | ||
| 876 | where | ||
| 877 | 'd: 'a, | ||
| 878 | T: 'a, | ||
| 879 | TXDMA: 'a, | ||
| 880 | RXDMA: 'a, | ||
| 881 | = impl Future<Output = Result<(), Self::Error>> + 'a; | ||
| 867 | 882 | ||
| 868 | fn read<'a>(&'a mut self, address: u8, buffer: &'a mut [u8]) -> Self::ReadFuture<'a> { | 883 | fn read<'a>(&'a mut self, address: u8, buffer: &'a mut [u8]) -> Self::ReadFuture<'a> { |
| 869 | self.read_dma(address, buffer, false) | 884 | self.read_dma(address, buffer, false) |
diff --git a/embassy-stm32/src/rng.rs b/embassy-stm32/src/rng.rs index 5655ed967..dd059eda7 100644 --- a/embassy-stm32/src/rng.rs +++ b/embassy-stm32/src/rng.rs | |||
| @@ -85,8 +85,10 @@ impl<T: Instance> CryptoRng for Rng<T> {} | |||
| 85 | 85 | ||
| 86 | impl<T: Instance> traits::rng::Rng for Rng<T> { | 86 | impl<T: Instance> traits::rng::Rng for Rng<T> { |
| 87 | type Error = Error; | 87 | type Error = Error; |
| 88 | #[rustfmt::skip] | 88 | type RngFuture<'a> |
| 89 | type RngFuture<'a> where Self: 'a = impl Future<Output=Result<(), Self::Error>> + 'a; | 89 | where |
| 90 | Self: 'a, | ||
| 91 | = impl Future<Output = Result<(), Self::Error>> + 'a; | ||
| 90 | 92 | ||
| 91 | fn fill_bytes<'a>(&'a mut self, dest: &'a mut [u8]) -> Self::RngFuture<'a> { | 93 | fn fill_bytes<'a>(&'a mut self, dest: &'a mut [u8]) -> Self::RngFuture<'a> { |
| 92 | unsafe { | 94 | unsafe { |
diff --git a/embassy-stm32/src/sdmmc/v2.rs b/embassy-stm32/src/sdmmc/v2.rs index 6032c2bb1..5914f92f5 100644 --- a/embassy-stm32/src/sdmmc/v2.rs +++ b/embassy-stm32/src/sdmmc/v2.rs | |||
| @@ -1545,10 +1545,14 @@ mod sdmmc_rs { | |||
| 1545 | 1545 | ||
| 1546 | impl<'d, T: Instance, P: Pins<T>> BlockDevice for Sdmmc<'d, T, P> { | 1546 | impl<'d, T: Instance, P: Pins<T>> BlockDevice for Sdmmc<'d, T, P> { |
| 1547 | type Error = Error; | 1547 | type Error = Error; |
| 1548 | #[rustfmt::skip] | 1548 | type ReadFuture<'a> |
| 1549 | type ReadFuture<'a> where Self: 'a = impl Future<Output = Result<(), Self::Error>> + 'a; | 1549 | where |
| 1550 | #[rustfmt::skip] | 1550 | Self: 'a, |
| 1551 | type WriteFuture<'a> where Self: 'a = impl Future<Output = Result<(), Self::Error>> + 'a; | 1551 | = impl Future<Output = Result<(), Self::Error>> + 'a; |
| 1552 | type WriteFuture<'a> | ||
| 1553 | where | ||
| 1554 | Self: 'a, | ||
| 1555 | = impl Future<Output = Result<(), Self::Error>> + 'a; | ||
| 1552 | 1556 | ||
| 1553 | fn read<'a>( | 1557 | fn read<'a>( |
| 1554 | &'a mut self, | 1558 | &'a mut self, |
diff --git a/embassy-stm32/src/spi/mod.rs b/embassy-stm32/src/spi/mod.rs index e74b2e157..4ae45a9be 100644 --- a/embassy-stm32/src/spi/mod.rs +++ b/embassy-stm32/src/spi/mod.rs | |||
| @@ -545,8 +545,10 @@ impl<'d, T: Instance, Tx, Rx> traits::Spi<u8> for Spi<'d, T, Tx, Rx> { | |||
| 545 | } | 545 | } |
| 546 | 546 | ||
| 547 | impl<'d, T: Instance, Tx: TxDmaChannel<T>, Rx> traits::Write<u8> for Spi<'d, T, Tx, Rx> { | 547 | impl<'d, T: Instance, Tx: TxDmaChannel<T>, Rx> traits::Write<u8> for Spi<'d, T, Tx, Rx> { |
| 548 | #[rustfmt::skip] | 548 | type WriteFuture<'a> |
| 549 | type WriteFuture<'a> where Self: 'a = impl Future<Output = Result<(), Self::Error>> + 'a; | 549 | where |
| 550 | Self: 'a, | ||
| 551 | = impl Future<Output = Result<(), Self::Error>> + 'a; | ||
| 550 | 552 | ||
| 551 | fn write<'a>(&'a mut self, data: &'a [u8]) -> Self::WriteFuture<'a> { | 553 | fn write<'a>(&'a mut self, data: &'a [u8]) -> Self::WriteFuture<'a> { |
| 552 | self.write_dma_u8(data) | 554 | self.write_dma_u8(data) |
| @@ -556,8 +558,10 @@ impl<'d, T: Instance, Tx: TxDmaChannel<T>, Rx> traits::Write<u8> for Spi<'d, T, | |||
| 556 | impl<'d, T: Instance, Tx: TxDmaChannel<T>, Rx: RxDmaChannel<T>> traits::Read<u8> | 558 | impl<'d, T: Instance, Tx: TxDmaChannel<T>, Rx: RxDmaChannel<T>> traits::Read<u8> |
| 557 | for Spi<'d, T, Tx, Rx> | 559 | for Spi<'d, T, Tx, Rx> |
| 558 | { | 560 | { |
| 559 | #[rustfmt::skip] | 561 | type ReadFuture<'a> |
| 560 | type ReadFuture<'a> where Self: 'a = impl Future<Output = Result<(), Self::Error>> + 'a; | 562 | where |
| 563 | Self: 'a, | ||
| 564 | = impl Future<Output = Result<(), Self::Error>> + 'a; | ||
| 561 | 565 | ||
| 562 | fn read<'a>(&'a mut self, data: &'a mut [u8]) -> Self::ReadFuture<'a> { | 566 | fn read<'a>(&'a mut self, data: &'a mut [u8]) -> Self::ReadFuture<'a> { |
| 563 | self.read_dma_u8(data) | 567 | self.read_dma_u8(data) |
| @@ -567,8 +571,10 @@ impl<'d, T: Instance, Tx: TxDmaChannel<T>, Rx: RxDmaChannel<T>> traits::Read<u8> | |||
| 567 | impl<'d, T: Instance, Tx: TxDmaChannel<T>, Rx: RxDmaChannel<T>> traits::FullDuplex<u8> | 571 | impl<'d, T: Instance, Tx: TxDmaChannel<T>, Rx: RxDmaChannel<T>> traits::FullDuplex<u8> |
| 568 | for Spi<'d, T, Tx, Rx> | 572 | for Spi<'d, T, Tx, Rx> |
| 569 | { | 573 | { |
| 570 | #[rustfmt::skip] | 574 | type WriteReadFuture<'a> |
| 571 | type WriteReadFuture<'a> where Self: 'a = impl Future<Output = Result<(), Self::Error>> + 'a; | 575 | where |
| 576 | Self: 'a, | ||
| 577 | = impl Future<Output = Result<(), Self::Error>> + 'a; | ||
| 572 | 578 | ||
| 573 | fn read_write<'a>( | 579 | fn read_write<'a>( |
| 574 | &'a mut self, | 580 | &'a mut self, |
diff --git a/embassy-stm32/src/usart/mod.rs b/embassy-stm32/src/usart/mod.rs index a87b7c020..b51a728c0 100644 --- a/embassy-stm32/src/usart/mod.rs +++ b/embassy-stm32/src/usart/mod.rs | |||
| @@ -219,8 +219,10 @@ impl<'d, T: Instance, TxDma, RxDma> embassy_traits::uart::Write for Uart<'d, T, | |||
| 219 | where | 219 | where |
| 220 | TxDma: crate::usart::TxDma<T>, | 220 | TxDma: crate::usart::TxDma<T>, |
| 221 | { | 221 | { |
| 222 | #[rustfmt::skip] | 222 | type WriteFuture<'a> |
| 223 | type WriteFuture<'a> where Self: 'a = impl Future<Output = Result<(), embassy_traits::uart::Error>> + 'a; | 223 | where |
| 224 | Self: 'a, | ||
| 225 | = impl Future<Output = Result<(), embassy_traits::uart::Error>> + 'a; | ||
| 224 | 226 | ||
| 225 | fn write<'a>(&'a mut self, buf: &'a [u8]) -> Self::WriteFuture<'a> { | 227 | fn write<'a>(&'a mut self, buf: &'a [u8]) -> Self::WriteFuture<'a> { |
| 226 | self.write_dma(buf) | 228 | self.write_dma(buf) |
| @@ -232,8 +234,10 @@ impl<'d, T: Instance, TxDma, RxDma> embassy_traits::uart::Read for Uart<'d, T, T | |||
| 232 | where | 234 | where |
| 233 | RxDma: crate::usart::RxDma<T>, | 235 | RxDma: crate::usart::RxDma<T>, |
| 234 | { | 236 | { |
| 235 | #[rustfmt::skip] | 237 | type ReadFuture<'a> |
| 236 | type ReadFuture<'a> where Self: 'a = impl Future<Output = Result<(), embassy_traits::uart::Error>> + 'a; | 238 | where |
| 239 | Self: 'a, | ||
| 240 | = impl Future<Output = Result<(), embassy_traits::uart::Error>> + 'a; | ||
| 237 | 241 | ||
| 238 | fn read<'a>(&'a mut self, buf: &'a mut [u8]) -> Self::ReadFuture<'a> { | 242 | fn read<'a>(&'a mut self, buf: &'a mut [u8]) -> Self::ReadFuture<'a> { |
| 239 | self.read_dma(buf) | 243 | self.read_dma(buf) |
