Skip to content

Commit 58e2e44

Browse files
Run Rustfmt
1 parent 7f3e7ee commit 58e2e44

File tree

3 files changed

+4
-15
lines changed

3 files changed

+4
-15
lines changed

hal/src/serial/spi.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -211,13 +211,12 @@ impl SpiConfiguration {
211211
}
212212

213213
/// Generates a default [`Spi`] configuration: test mode inactive.
214-
impl Default for SpiConfiguration{
214+
impl Default for SpiConfiguration {
215215
fn default() -> Self {
216216
SpiConfiguration { test_mode: false }
217217
}
218218
}
219219

220-
221220
/// SPI peripheral abstraction.
222221
pub struct Spi<M: SpiMeta> {
223222
meta: PhantomData<M>,
@@ -642,10 +641,7 @@ impl<'spi, M: SpiMeta> blocking::spi::Transactional<u8> for Client<'spi, M> {
642641

643642
/// Execute the provided transactions, deasserting the select line
644643
/// after the last transmitted word.
645-
fn exec(
646-
&mut self,
647-
operations: &mut [blocking::spi::Operation<u8>],
648-
) -> Result<(), Self::Error> {
644+
fn exec(&mut self, operations: &mut [blocking::spi::Operation<u8>]) -> Result<(), Self::Error> {
649645
use blocking::spi::Operation;
650646

651647
let len = operations.len();

hal/src/serial/usart/spi.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -227,10 +227,7 @@ impl<M: UsartMeta, R: SpiRole> ehal::spi::FullDuplex<u8> for Spi<M, R> {
227227
impl<M: UsartMeta, R: SpiRole> blocking::spi::Transactional<u8> for Spi<M, R> {
228228
type Error = SpiError;
229229

230-
fn exec(
231-
&mut self,
232-
operations: &mut [blocking::spi::Operation<u8>],
233-
) -> Result<(), Self::Error> {
230+
fn exec(&mut self, operations: &mut [blocking::spi::Operation<u8>]) -> Result<(), Self::Error> {
234231
use blocking::spi::Operation;
235232

236233
for o in operations.iter_mut() {

hal/src/usb.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -221,11 +221,7 @@ impl Inner {
221221
#[inline(always)]
222222
fn write_fifo(&self, ep: usize, buf: &[u8]) {
223223
unsafe {
224-
core::ptr::copy_nonoverlapping(
225-
buf.as_ptr(),
226-
self.fifo_addr(ep) as *mut u8,
227-
buf.len(),
228-
);
224+
core::ptr::copy_nonoverlapping(buf.as_ptr(), self.fifo_addr(ep) as *mut u8, buf.len());
229225
}
230226
}
231227

0 commit comments

Comments
 (0)