diff options
Diffstat (limited to 'crates/ide/src/diagnostics.rs')
-rw-r--r-- | crates/ide/src/diagnostics.rs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/crates/ide/src/diagnostics.rs b/crates/ide/src/diagnostics.rs index add102ff2..b30cdb6ed 100644 --- a/crates/ide/src/diagnostics.rs +++ b/crates/ide/src/diagnostics.rs | |||
@@ -257,8 +257,7 @@ mod tests { | |||
257 | 257 | ||
258 | assert_eq_text!(&after, &actual); | 258 | assert_eq_text!(&after, &actual); |
259 | assert!( | 259 | assert!( |
260 | fix.fix_trigger_range.start() <= file_position.offset | 260 | fix.fix_trigger_range.contains_inclusive(file_position.offset), |
261 | && fix.fix_trigger_range.end() >= file_position.offset, | ||
262 | "diagnostic fix range {:?} does not touch cursor position {:?}", | 261 | "diagnostic fix range {:?} does not touch cursor position {:?}", |
263 | fix.fix_trigger_range, | 262 | fix.fix_trigger_range, |
264 | file_position.offset | 263 | file_position.offset |
@@ -288,8 +287,7 @@ mod tests { | |||
288 | 287 | ||
289 | assert_eq_text!(&after, &actual); | 288 | assert_eq_text!(&after, &actual); |
290 | assert!( | 289 | assert!( |
291 | fix.fix_trigger_range.start() <= file_position.offset | 290 | fix.fix_trigger_range.contains_inclusive(file_position.offset), |
292 | && fix.fix_trigger_range.end() >= file_position.offset, | ||
293 | "diagnostic fix range {:?} does not touch cursor position {:?}", | 291 | "diagnostic fix range {:?} does not touch cursor position {:?}", |
294 | fix.fix_trigger_range, | 292 | fix.fix_trigger_range, |
295 | file_position.offset | 293 | file_position.offset |