We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4a1a5ff commit 28c73f8Copy full SHA for 28c73f8
crates/ide/src/rename.rs
@@ -49,10 +49,10 @@ pub(crate) fn prepare_rename(
49
bail!("invalid text range")
50
}
51
})
52
- .reduce(|acc, cur| match acc {
+ .reduce(|acc, cur| match (acc, cur) {
53
// ensure all ranges are the same
54
- Ok(acc_inner) if cur.is_ok() && acc_inner == cur.unwrap() => acc,
55
- Err(e) => Err(e),
+ (Ok(acc_inner), Ok(cur_inner)) if acc_inner == cur_inner => Ok(acc_inner),
+ (Err(e), _) => Err(e),
56
_ => bail!("inconsistent text range"),
57
});
58
0 commit comments