Skip to content

refactor: convert operation-style bool returns to Result - #15

Merged
retsimx merged 1 commit into
mainfrom
refactor/bool-to-result
Mar 23, 2026
Merged

refactor: convert operation-style bool returns to Result#15
retsimx merged 1 commit into
mainfrom
refactor/bool-to-result

Conversation

@retsimx

@retsimx retsimx commented Mar 23, 2026

Copy link
Copy Markdown
Owner
  • Replace functions that signal operation success/failure via bool with Result<(), ()>, distinguishing success (Ok) from failure (Err) explicitly
  • Update all call sites to use .is_ok()/.is_err() or match on the Result
  • Update all mocks in tests to return Ok(())/Err(()) instead of true/false
  • Crypto decryption operations now propagate errors through the type system rather than silently returning false on MIC mismatch or I/O failure
  • OTA area validation now surfaces hardware I/O errors separately from logical invalidity via Result<bool, ()>

- Replace functions that signal operation success/failure via bool with
  Result<(), ()>, distinguishing success (Ok) from failure (Err) explicitly
- Update all call sites to use .is_ok()/.is_err() or match on the Result
- Update all mocks in tests to return Ok(())/Err(()) instead of true/false
- Crypto decryption operations now propagate errors through the type system
  rather than silently returning false on MIC mismatch or I/O failure
- OTA area validation now surfaces hardware I/O errors separately from
  logical invalidity via Result<bool, ()>
@github-actions

Copy link
Copy Markdown

📊 Coverage Report

Metric Coverage
Lines 99.84%
Functions 100.00%
Regions 99.75%
Branches 93.80%

@retsimx
retsimx merged commit e1e882f into main Mar 23, 2026
5 checks passed
@retsimx
retsimx deleted the refactor/bool-to-result branch March 23, 2026 02:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant