From e4ac9e90419841a338d6909af01acc8548c8b3c3 Mon Sep 17 00:00:00 2001 From: Brent Westbrook <36778786+ntBre@users.noreply.github.com> Date: Thu, 25 Sep 2025 15:35:13 -0400 Subject: [PATCH] Replace two more uses of unsafe with const `Option::unwrap` (#20584) 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. --- crates/ruff_macros/src/newtype_index.rs | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/crates/ruff_macros/src/newtype_index.rs b/crates/ruff_macros/src/newtype_index.rs index 99663542d7..73ebf50ddb 100644 --- a/crates/ruff_macros/src/newtype_index.rs +++ b/crates/ruff_macros/src/newtype_index.rs @@ -45,11 +45,7 @@ pub(super) fn generate_newtype_index(item: ItemStruct) -> syn::Result Self { @@ -58,11 +54,7 @@ pub(super) fn generate_newtype_index(item: ItemStruct) -> syn::Result