Skip to content

Commit c2f9b47

Browse files
committed
Auto merge of rust-lang#18029 - lnicola:minor-stuff, r=lnicola
minor: fix two nits
2 parents 090a38c + 2f8ef4c commit c2f9b47

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

src/tools/rust-analyzer/crates/hir-ty/src/consteval.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ pub(crate) fn const_eval_discriminant_variant(
287287
}
288288

289289
let repr = db.enum_data(loc.parent).repr;
290-
let is_signed = repr.and_then(|repr| repr.int).is_none_or(|int| int.is_signed());
290+
let is_signed = IsNoneOr::is_none_or(repr.and_then(|repr| repr.int), |int| int.is_signed());
291291

292292
let mir_body = db.monomorphized_mir_body(
293293
def,

src/tools/rust-analyzer/crates/ide-assists/src/handlers/toggle_macro_delimiter.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,9 @@ pub(crate) fn toggle_macro_delimiter(acc: &mut Assists, ctx: &AssistContext<'_>)
6464
acc.add(
6565
AssistId("toggle_macro_delimiter", AssistKind::Refactor),
6666
match token {
67-
MacroDelims::LPar => "Replace delimiters with braces",
68-
MacroDelims::RPar => "Replace delimiters with braces",
69-
MacroDelims::LBra => "Replace delimiters with parentheses",
70-
MacroDelims::RBra => "Replace delimiters with parentheses",
71-
MacroDelims::LCur => "Replace delimiters with brackets",
72-
MacroDelims::RCur => "Replace delimiters with brackets",
67+
MacroDelims::LPar | MacroDelims::RPar => "Replace delimiters with braces",
68+
MacroDelims::LBra | MacroDelims::RBra => "Replace delimiters with parentheses",
69+
MacroDelims::LCur | MacroDelims::RCur => "Replace delimiters with brackets",
7370
},
7471
token_tree.syntax().text_range(),
7572
|builder| {

0 commit comments

Comments
 (0)