Skip to content

Commit 5bfef78

Browse files
committed
Update to defmt 1.0.1, embedded-hal-bus 0.3.0, env_logger 0.11.8, heapless 0.9.1, and hex-literal 1.0.0.
1 parent 2851be4 commit 5bfef78

File tree

9 files changed

+21
-16
lines changed

9 files changed

+21
-16
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ The format is based on [Keep a Changelog] and this project adheres to [Semantic
66

77
## [Unreleased]
88

9+
### Changed
10+
11+
- Updated to `defmt` 1.0.1, `embedded-hal-bus` 0.3.0, `env_logger` 0.11.8, `heapless` 0.9.1, and `hex-literal` 1.0.0.
12+
- Raised the minimum supported Rust version to 1.86.0.
13+
914
## [Version 0.9.0] - 2025-06-08
1015

1116
### Changed

Cargo.toml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,22 +11,22 @@ repository = "https://github.com/rust-embedded-community/embedded-sdmmc-rs"
1111
version = "0.9.0"
1212

1313
# Make sure to update the CI too!
14-
rust-version = "1.76"
14+
rust-version = "1.86"
1515

1616
[dependencies]
1717
byteorder = {version = "1", default-features = false}
18-
defmt = {version = "0.3", optional = true}
18+
defmt = {version = "1.0.1", optional = true}
1919
embedded-hal = "1.0.0"
2020
embedded-io = "0.6.1"
21-
heapless = "^0.8"
21+
heapless = "0.9.1"
2222
log = {version = "0.4", default-features = false, optional = true}
2323

2424
[dev-dependencies]
2525
chrono = "0.4"
26-
embedded-hal-bus = "0.2.0"
27-
env_logger = "0.10.0"
26+
embedded-hal-bus = "0.3.0"
27+
env_logger = "0.11.8"
2828
flate2 = "1.0"
29-
hex-literal = "0.4.1"
29+
hex-literal = "1.0.0"
3030
sha2 = "0.10"
3131

3232
[features]

src/fat/bpb.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ impl<'a> Bpb<'a> {
2020
pub(crate) const FOOTER_VALUE: u16 = 0xAA55;
2121

2222
/// Attempt to parse a Boot Parameter Block from a 512 byte sector.
23-
pub fn create_from_bytes(data: &[u8; 512]) -> Result<Bpb, &'static str> {
23+
pub fn create_from_bytes(data: &[u8; 512]) -> Result<Bpb<'_>, &'static str> {
2424
let mut bpb = Bpb {
2525
data,
2626
fat_type: FatType::Fat16,

src/fat/info.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ impl<'a> InfoSector<'a> {
4949
const TRAIL_SIG: u32 = 0xAA55_0000;
5050

5151
/// Try and create a new Info Sector from a block.
52-
pub fn create_from_bytes(data: &[u8; 512]) -> Result<InfoSector, &'static str> {
52+
pub fn create_from_bytes(data: &[u8; 512]) -> Result<InfoSector<'_>, &'static str> {
5353
let info = InfoSector { data };
5454
if info.lead_sig() != Self::LEAD_SIG {
5555
return Err("Bad lead signature on InfoSector");

src/fat/ondiskdirentry.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ impl<'a> OnDiskDirEntry<'a> {
5757

5858
/// Create a new on-disk directory entry from a block of 32 bytes read
5959
/// from a directory file.
60-
pub fn new(data: &[u8]) -> OnDiskDirEntry {
60+
pub fn new(data: &[u8]) -> OnDiskDirEntry<'_> {
6161
OnDiskDirEntry { data }
6262
}
6363

src/filesystem/directory.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ impl RawDirectory {
5858
>(
5959
self,
6060
volume_mgr: &VolumeManager<D, T, MAX_DIRS, MAX_FILES, MAX_VOLUMES>,
61-
) -> Directory<D, T, MAX_DIRS, MAX_FILES, MAX_VOLUMES>
61+
) -> Directory<'_, D, T, MAX_DIRS, MAX_FILES, MAX_VOLUMES>
6262
where
6363
D: crate::BlockDevice,
6464
T: crate::TimeSource,
@@ -113,7 +113,7 @@ where
113113
pub fn open_dir<N>(
114114
&self,
115115
name: N,
116-
) -> Result<Directory<D, T, MAX_DIRS, MAX_FILES, MAX_VOLUMES>, Error<D::Error>>
116+
) -> Result<Directory<'_, D, T, MAX_DIRS, MAX_FILES, MAX_VOLUMES>, Error<D::Error>>
117117
where
118118
N: ToShortFileName,
119119
{
@@ -193,7 +193,7 @@ where
193193
&self,
194194
name: N,
195195
mode: crate::Mode,
196-
) -> Result<crate::File<D, T, MAX_DIRS, MAX_FILES, MAX_VOLUMES>, crate::Error<D::Error>>
196+
) -> Result<crate::File<'_, D, T, MAX_DIRS, MAX_FILES, MAX_VOLUMES>, crate::Error<D::Error>>
197197
where
198198
N: super::ToShortFileName,
199199
{

src/filesystem/files.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ impl RawFile {
3030
pub fn to_file<D, T, const MAX_DIRS: usize, const MAX_FILES: usize, const MAX_VOLUMES: usize>(
3131
self,
3232
volume_mgr: &VolumeManager<D, T, MAX_DIRS, MAX_FILES, MAX_VOLUMES>,
33-
) -> File<D, T, MAX_DIRS, MAX_FILES, MAX_VOLUMES>
33+
) -> File<'_, D, T, MAX_DIRS, MAX_FILES, MAX_VOLUMES>
3434
where
3535
D: crate::BlockDevice,
3636
T: crate::TimeSource,

src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ impl RawVolume {
297297
>(
298298
self,
299299
volume_mgr: &VolumeManager<D, T, MAX_DIRS, MAX_FILES, MAX_VOLUMES>,
300-
) -> Volume<D, T, MAX_DIRS, MAX_FILES, MAX_VOLUMES>
300+
) -> Volume<'_, D, T, MAX_DIRS, MAX_FILES, MAX_VOLUMES>
301301
where
302302
D: crate::BlockDevice,
303303
T: crate::TimeSource,
@@ -346,7 +346,7 @@ where
346346
/// use `open_file_in_dir`.
347347
pub fn open_root_dir(
348348
&self,
349-
) -> Result<crate::Directory<D, T, MAX_DIRS, MAX_FILES, MAX_VOLUMES>, Error<D::Error>> {
349+
) -> Result<crate::Directory<'_, D, T, MAX_DIRS, MAX_FILES, MAX_VOLUMES>, Error<D::Error>> {
350350
let d = self.volume_mgr.open_root_dir(self.raw_volume)?;
351351
Ok(d.to_directory(self.volume_mgr))
352352
}

src/volume_mgr.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ where
110110
pub fn open_volume(
111111
&self,
112112
volume_idx: VolumeIdx,
113-
) -> Result<Volume<D, T, MAX_DIRS, MAX_FILES, MAX_VOLUMES>, Error<D::Error>> {
113+
) -> Result<Volume<'_, D, T, MAX_DIRS, MAX_FILES, MAX_VOLUMES>, Error<D::Error>> {
114114
let v = self.open_raw_volume(volume_idx)?;
115115
Ok(v.to_volume(self))
116116
}

0 commit comments

Comments
 (0)