Skip to content

Commit

Permalink
Fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
robin-nitrokey committed Oct 14, 2024
1 parent d9db424 commit aa9aa09
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 13 deletions.
4 changes: 1 addition & 3 deletions components/boards/src/flash.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,7 @@ where
for chunk in data.chunks(CHUNK_SIZE) {
let buf = &mut buf[..chunk.len()];
buf.copy_from_slice(chunk);
flash
.write_bytes(off, buf)
.map_err(|_| Error::IO)?;
flash.write_bytes(off, buf).map_err(|_| Error::IO)?;
off += CHUNK_SIZE as u32;
}
Ok(data.len())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,7 @@ fn nvmc_to_lfs_return(
r: Result<(), nrf52840_hal::nvmc::NvmcError>,
len: usize,
) -> Result<usize, littlefs2::io::Error> {
r.map(|_| len)
.map_err(|_| littlefs2::io::Error::IO) // 'NVMC'
r.map(|_| len).map_err(|_| littlefs2::io::Error::IO) // 'NVMC'
}

impl FlashStorage {
Expand Down
3 changes: 1 addition & 2 deletions components/boards/src/soc/nrf52/flash.rs
Original file line number Diff line number Diff line change
Expand Up @@ -269,8 +269,7 @@ fn nvmc_to_lfs_return(
r: Result<(), nrf52840_hal::nvmc::NvmcError>,
len: usize,
) -> Result<usize, littlefs2::io::Error> {
r.map(|_| len)
.map_err(|_| littlefs2::io::Error::IO) // 'NVMC'
r.map(|_| len).map_err(|_| littlefs2::io::Error::IO) // 'NVMC'
}

impl<const START: usize, const END: usize> FlashStorage<START, END> {
Expand Down
5 changes: 4 additions & 1 deletion components/lfs-backup/src/lfs_backup.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
use littlefs2::consts::PATH_MAX;
use littlefs2::fs::{DirEntry, Filesystem};

use littlefs2::{path, path::{Path, PathBuf}};
use littlefs2::{
path,
path::{Path, PathBuf},
};

use serde::{Deserialize, Serialize};

Expand Down
10 changes: 5 additions & 5 deletions components/provisioner-app/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@ generate_macros!();

use core::convert::TryFrom;
use heapless::Vec;
use littlefs2::{path, path::{Path, PathBuf}};
use littlefs2::{
path,
path::{Path, PathBuf},
};
use trussed::{
client,
key::{Flags, Key, Kind as KeyKind},
Expand Down Expand Up @@ -245,10 +248,7 @@ where
&serialized_bytes,
)
.map_err(|_| Error::NotEnoughMemory)?;
info!(
"stored to {}",
FILENAME_P256_SECRET.as_str()
);
info!("stored to {}", FILENAME_P256_SECRET.as_str());

reply
.extend_from_slice(&keypair.public.to_untagged_bytes())
Expand Down

0 comments on commit aa9aa09

Please sign in to comment.