diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0e5f31a..52ed3b7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,7 +29,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: dtolnay/rust-toolchain@1.85.0 + - uses: dtolnay/rust-toolchain@1.86.0 - run: cargo check --release cross-check: diff --git a/Cargo.toml b/Cargo.toml index 86162b2..6b02234 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ name = "cfdp-rs" version = "0.2.0" edition = "2024" -rust-version = "1.85.0" +rust-version = "1.86.0" authors = ["Robin Mueller "] description = "High level CCSDS File Delivery Protocol components" homepage = "https://egit.irs.uni-stuttgart.de/rust/cfdp" diff --git a/src/lost_segments.rs b/src/lost_segments.rs index bd2af38..81ee175 100644 --- a/src/lost_segments.rs +++ b/src/lost_segments.rs @@ -121,10 +121,10 @@ impl LostSegmentStore for LostSegmentsMap { if lost_seg.0 > lost_seg.1 { return Err(LostSegmentError::StartLargerThanEnd(lost_seg)); } - if let Some(capacity) = self.opt_capacity - && self.map.len() == capacity - { - return Err(LostSegmentError::StoreFull); + if let Some(capacity) = self.opt_capacity { + if self.map.len() == capacity { + return Err(LostSegmentError::StoreFull); + } } self.map.insert(lost_seg); Ok(())