Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
strategy:
matrix:
# Always run MSRV too!
rust: ["stable", "1.76"]
rust: ["stable", "1.86"]
features: ['log', 'defmt-log', '""']
steps:
- uses: actions/checkout@v4
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ The format is based on [Keep a Changelog] and this project adheres to [Semantic

## [Unreleased]

### Changed

- 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.
- Raised the minimum supported Rust version to 1.86.0.

## [Version 0.9.0] - 2025-06-08

### Changed
Expand Down
12 changes: 6 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,22 @@ repository = "https://github.com/rust-embedded-community/embedded-sdmmc-rs"
version = "0.9.0"

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

[dependencies]
byteorder = {version = "1", default-features = false}
defmt = {version = "0.3", optional = true}
defmt = {version = "1.0.1", optional = true}
embedded-hal = "1.0.0"
embedded-io = "0.6.1"
heapless = "^0.8"
heapless = "0.9.1"
log = {version = "0.4", default-features = false, optional = true}

[dev-dependencies]
chrono = "0.4"
embedded-hal-bus = "0.2.0"
env_logger = "0.10.0"
embedded-hal-bus = "0.3.0"
env_logger = "0.11.8"
flate2 = "1.0"
hex-literal = "0.4.1"
hex-literal = "1.0.0"
sha2 = "0.10"

[features]
Expand Down
2 changes: 1 addition & 1 deletion src/fat/bpb.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ impl<'a> Bpb<'a> {
pub(crate) const FOOTER_VALUE: u16 = 0xAA55;

/// Attempt to parse a Boot Parameter Block from a 512 byte sector.
pub fn create_from_bytes(data: &[u8; 512]) -> Result<Bpb, &'static str> {
pub fn create_from_bytes(data: &[u8; 512]) -> Result<Bpb<'_>, &'static str> {
let mut bpb = Bpb {
data,
fat_type: FatType::Fat16,
Expand Down
2 changes: 1 addition & 1 deletion src/fat/info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ impl<'a> InfoSector<'a> {
const TRAIL_SIG: u32 = 0xAA55_0000;

/// Try and create a new Info Sector from a block.
pub fn create_from_bytes(data: &[u8; 512]) -> Result<InfoSector, &'static str> {
pub fn create_from_bytes(data: &[u8; 512]) -> Result<InfoSector<'_>, &'static str> {
let info = InfoSector { data };
if info.lead_sig() != Self::LEAD_SIG {
return Err("Bad lead signature on InfoSector");
Expand Down
2 changes: 1 addition & 1 deletion src/fat/ondiskdirentry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ impl<'a> OnDiskDirEntry<'a> {

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

Expand Down
6 changes: 3 additions & 3 deletions src/filesystem/directory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ impl RawDirectory {
>(
self,
volume_mgr: &VolumeManager<D, T, MAX_DIRS, MAX_FILES, MAX_VOLUMES>,
) -> Directory<D, T, MAX_DIRS, MAX_FILES, MAX_VOLUMES>
) -> Directory<'_, D, T, MAX_DIRS, MAX_FILES, MAX_VOLUMES>
where
D: crate::BlockDevice,
T: crate::TimeSource,
Expand Down Expand Up @@ -113,7 +113,7 @@ where
pub fn open_dir<N>(
&self,
name: N,
) -> Result<Directory<D, T, MAX_DIRS, MAX_FILES, MAX_VOLUMES>, Error<D::Error>>
) -> Result<Directory<'_, D, T, MAX_DIRS, MAX_FILES, MAX_VOLUMES>, Error<D::Error>>
where
N: ToShortFileName,
{
Expand Down Expand Up @@ -193,7 +193,7 @@ where
&self,
name: N,
mode: crate::Mode,
) -> Result<crate::File<D, T, MAX_DIRS, MAX_FILES, MAX_VOLUMES>, crate::Error<D::Error>>
) -> Result<crate::File<'_, D, T, MAX_DIRS, MAX_FILES, MAX_VOLUMES>, crate::Error<D::Error>>
where
N: super::ToShortFileName,
{
Expand Down
2 changes: 1 addition & 1 deletion src/filesystem/files.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ impl RawFile {
pub fn to_file<D, T, const MAX_DIRS: usize, const MAX_FILES: usize, const MAX_VOLUMES: usize>(
self,
volume_mgr: &VolumeManager<D, T, MAX_DIRS, MAX_FILES, MAX_VOLUMES>,
) -> File<D, T, MAX_DIRS, MAX_FILES, MAX_VOLUMES>
) -> File<'_, D, T, MAX_DIRS, MAX_FILES, MAX_VOLUMES>
where
D: crate::BlockDevice,
T: crate::TimeSource,
Expand Down
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ impl RawVolume {
>(
self,
volume_mgr: &VolumeManager<D, T, MAX_DIRS, MAX_FILES, MAX_VOLUMES>,
) -> Volume<D, T, MAX_DIRS, MAX_FILES, MAX_VOLUMES>
) -> Volume<'_, D, T, MAX_DIRS, MAX_FILES, MAX_VOLUMES>
where
D: crate::BlockDevice,
T: crate::TimeSource,
Expand Down Expand Up @@ -346,7 +346,7 @@ where
/// use `open_file_in_dir`.
pub fn open_root_dir(
&self,
) -> Result<crate::Directory<D, T, MAX_DIRS, MAX_FILES, MAX_VOLUMES>, Error<D::Error>> {
) -> Result<crate::Directory<'_, D, T, MAX_DIRS, MAX_FILES, MAX_VOLUMES>, Error<D::Error>> {
let d = self.volume_mgr.open_root_dir(self.raw_volume)?;
Ok(d.to_directory(self.volume_mgr))
}
Expand Down
2 changes: 1 addition & 1 deletion src/volume_mgr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ where
pub fn open_volume(
&self,
volume_idx: VolumeIdx,
) -> Result<Volume<D, T, MAX_DIRS, MAX_FILES, MAX_VOLUMES>, Error<D::Error>> {
) -> Result<Volume<'_, D, T, MAX_DIRS, MAX_FILES, MAX_VOLUMES>, Error<D::Error>> {
let v = self.open_raw_volume(volume_idx)?;
Ok(v.to_volume(self))
}
Expand Down