Skip to content

Commit 594e0a5

Browse files
committed
Only compare range and label
1 parent dbeb27e commit 594e0a5

File tree

2 files changed

+70
-171
lines changed

2 files changed

+70
-171
lines changed

crates/ide/src/inlay_hints.rs

+6-2
Original file line numberDiff line numberDiff line change
@@ -658,7 +658,9 @@ mod tests {
658658
pub(super) fn check_expect(config: InlayHintsConfig, ra_fixture: &str, expect: Expect) {
659659
let (analysis, file_id) = fixture::file(ra_fixture);
660660
let inlay_hints = analysis.inlay_hints(&config, file_id, None).unwrap();
661-
expect.assert_debug_eq(&inlay_hints)
661+
let filtered =
662+
inlay_hints.into_iter().map(|hint| (hint.range, hint.label)).collect::<Vec<_>>();
663+
expect.assert_debug_eq(&filtered)
662664
}
663665

664666
#[track_caller]
@@ -674,7 +676,9 @@ mod tests {
674676
loc.range = TextRange::empty(TextSize::from(0));
675677
}
676678
});
677-
expect.assert_debug_eq(&inlay_hints)
679+
let filtered =
680+
inlay_hints.into_iter().map(|hint| (hint.range, hint.label)).collect::<Vec<_>>();
681+
expect.assert_debug_eq(&filtered)
678682
}
679683

680684
/// Computes inlay hints for the fixture, applies all the provided text edits and then runs

0 commit comments

Comments
 (0)