Skip to content

Replace two more uses of unsafe with const Option::unwrap#20584

Merged
ntBre merged 1 commit intomainfrom
brent/safe-const-unwrap
Sep 25, 2025
Merged

Replace two more uses of unsafe with const Option::unwrap#20584
ntBre merged 1 commit intomainfrom
brent/safe-const-unwrap

Conversation

@ntBre
Copy link
Contributor

@ntBre ntBre commented Sep 25, 2025

I guess I missed these in #20007, but I found them today while grepping for something else. Option::unwrap has been const since 1.83, so we can use it here and avoid some unsafe code.

I guess I missed these in #20007, but I found them today while grepping for
something else. `Option::unwrap` has been const since 1.83, so we can use it
here and avoid some unsafe code.
@ntBre ntBre added the internal An internal refactor or improvement label Sep 25, 2025
@github-actions
Copy link
Contributor

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

@ntBre ntBre marked this pull request as ready for review September 25, 2025 19:17
@ntBre ntBre requested a review from MichaReiser September 25, 2025 19:17
@ntBre ntBre merged commit e4ac9e9 into main Sep 25, 2025
37 checks passed
@ntBre ntBre deleted the brent/safe-const-unwrap branch September 25, 2025 19:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

internal An internal refactor or improvement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants