Skip to content

Commit 9b5a6ea

Browse files
Format everything
1 parent 3166eb5 commit 9b5a6ea

16 files changed

+36
-26
lines changed

asm/inline.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
//! All of these functions should be blanket-`unsafe`. `cortex-m` provides safe wrappers where
77
//! applicable.
88
9-
use core::sync::atomic::{Ordering, compiler_fence};
9+
use core::sync::atomic::{compiler_fence, Ordering};
1010

1111
#[inline(always)]
1212
pub unsafe fn __bkpt() {
@@ -187,7 +187,7 @@ pub unsafe fn __syscall(mut nr: u32, arg: u32) -> u32 {
187187
pub use self::v7m::*;
188188
#[cfg(any(armv7m, armv8m_main))]
189189
mod v7m {
190-
use core::sync::atomic::{Ordering, compiler_fence};
190+
use core::sync::atomic::{compiler_fence, Ordering};
191191

192192
#[inline(always)]
193193
pub unsafe fn __basepri_max(val: u8) {

bin/thumbv6m-none-eabi-lto.a

0 Bytes
Binary file not shown.

bin/thumbv7em-none-eabi-lto.a

4 Bytes
Binary file not shown.

bin/thumbv7em-none-eabihf-lto.a

-4 Bytes
Binary file not shown.

bin/thumbv7m-none-eabi-lto.a

-4 Bytes
Binary file not shown.

bin/thumbv8m.base-none-eabi-lto.a

0 Bytes
Binary file not shown.

bin/thumbv8m.main-none-eabi-lto.a

4 Bytes
Binary file not shown.

bin/thumbv8m.main-none-eabihf-lto.a

-4 Bytes
Binary file not shown.

cortex-m-semihosting/src/hio.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//! Host I/O
22
3-
use core::{fmt, slice};
43
use crate::nr;
4+
use core::{fmt, slice};
55

66
/// A byte stream to the host (e.g., host's stdout or stderr).
77
#[derive(Clone, Copy)]
@@ -38,8 +38,7 @@ pub fn hstdout() -> Result<HostStream, ()> {
3838

3939
fn open(name: &str, mode: usize) -> Result<HostStream, ()> {
4040
let name = name.as_bytes();
41-
match unsafe { syscall!(OPEN, name.as_ptr(), mode, name.len() - 1) } as
42-
isize {
41+
match unsafe { syscall!(OPEN, name.as_ptr(), mode, name.len() - 1) } as isize {
4342
-1 => Err(()),
4443
fd => Ok(HostStream { fd: fd as usize }),
4544
}
@@ -53,9 +52,7 @@ fn write_all(fd: usize, mut buffer: &[u8]) -> Result<(), ()> {
5352
// `n` bytes were not written
5453
n if n <= buffer.len() => {
5554
let offset = (buffer.len() - n) as isize;
56-
buffer = unsafe {
57-
slice::from_raw_parts(buffer.as_ptr().offset(offset), n)
58-
}
55+
buffer = unsafe { slice::from_raw_parts(buffer.as_ptr().offset(offset), n) }
5956
}
6057
#[cfg(feature = "jlink-quirks")]
6158
// Error (-1) - should be an error but JLink can return -1, -2, -3,...

cortex-m-semihosting/src/lib.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -218,9 +218,7 @@ pub unsafe fn syscall1(_nr: usize, _arg: usize) -> usize {
218218
}
219219

220220
#[cfg(all(thumb, feature = "no-semihosting"))]
221-
() => {
222-
0
223-
}
221+
() => 0,
224222

225223
#[cfg(not(thumb))]
226224
() => unimplemented!(),

0 commit comments

Comments
 (0)