Skip to content

Comments

chore: cleaning up examples of is_some() + unwrap()#362

Merged
chet merged 1 commit intoNVIDIA:mainfrom
chet:refactor_is_some_unwrap
Feb 23, 2026
Merged

chore: cleaning up examples of is_some() + unwrap()#362
chet merged 1 commit intoNVIDIA:mainfrom
chet:refactor_is_some_unwrap

Conversation

@chet
Copy link
Contributor

@chet chet commented Feb 22, 2026

Description

I noticed a few of these last week when I was doing some other work, and figured I'd sweep through and find ~most remaining examples of this. Insetad of x.is_some() followed by let y = x.unwrap(), just use if let Some(..), and a few other pattern adjustments (including some similar .is_none() use-cases).

All existing tests contiuning to pass. I checked to see if I needed to add any additional test coverage here but it all appears covered.

Signed-off-by: Chet Nichols III chetn@nvidia.com

Type of Change

  • Add - New feature or capability
  • Change - Changes in existing functionality
  • Fix - Bug fixes
  • Remove - Removed features or deprecated functionality
  • Internal - Internal changes (refactoring, tests, docs, etc.)

Related Issues (Optional)

Breaking Changes

  • This PR contains breaking changes

Testing

  • Unit tests added/updated
  • Integration tests added/updated
  • Manual testing performed
  • No testing required (docs, internal refactor, etc.)

Additional Notes

I noticed a few of these last week when I was doing some other work, and figured I'd sweep through and find ~most remaining examples of this. Insetad of `x.is_some()` followed by `let y = x.unwrap()`, just use `if let Some(..)`, and a few other pattern adjustments.

All existing tests contiuning to pass. I checked to see if I needed to add any additional test coverage here but it all appears covered.

Signed-off-by: Chet Nichols III <chetn@nvidia.com>
@chet chet requested a review from a team as a code owner February 22, 2026 18:10
@chet chet merged commit b40c0b1 into NVIDIA:main Feb 23, 2026
34 checks passed
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.

3 participants