Skip to content

fix: assertions for Option are not available for borrowed &Option#42

Merged
haraldmaida merged 1 commit into
mainfrom
fix/assertions-for-option-are-not-available-for-borrowed-option
Jun 5, 2025
Merged

fix: assertions for Option are not available for borrowed &Option#42
haraldmaida merged 1 commit into
mainfrom
fix/assertions-for-option-are-not-available-for-borrowed-option

Conversation

@haraldmaida
Copy link
Copy Markdown
Member

Currently a borrowed Option can not be asserted. Assertions like:

assert_that!(&Some(42)).is_some();
assert_that!(&Some([1, 2, 3])).some().contains(&2);

are expected to work but result in compile errors.

Implemented assertions for Option for borrowed &Option as well.

@haraldmaida haraldmaida self-assigned this Jun 5, 2025
@haraldmaida haraldmaida added the bug Something isn't working label Jun 5, 2025
@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 5, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.18%. Comparing base (6a21d33) to head (5018bae).

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #42      +/-   ##
==========================================
+ Coverage   96.10%   96.18%   +0.08%     
==========================================
  Files          26       26              
  Lines        2902     2965      +63     
  Branches     2902     2965      +63     
==========================================
+ Hits         2789     2852      +63     
  Misses        109      109              
  Partials        4        4              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@haraldmaida haraldmaida merged commit 60049e0 into main Jun 5, 2025
18 checks passed
@haraldmaida haraldmaida deleted the fix/assertions-for-option-are-not-available-for-borrowed-option branch June 5, 2025 22:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant