mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 12:54:58 +00:00
unwrap--
This commit is contained in:
parent
4a1a5ff54e
commit
28c73f8374
1 changed files with 3 additions and 3 deletions
|
@ -49,10 +49,10 @@ pub(crate) fn prepare_rename(
|
||||||
bail!("invalid text range")
|
bail!("invalid text range")
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.reduce(|acc, cur| match acc {
|
.reduce(|acc, cur| match (acc, cur) {
|
||||||
// ensure all ranges are the same
|
// ensure all ranges are the same
|
||||||
Ok(acc_inner) if cur.is_ok() && acc_inner == cur.unwrap() => acc,
|
(Ok(acc_inner), Ok(cur_inner)) if acc_inner == cur_inner => Ok(acc_inner),
|
||||||
Err(e) => Err(e),
|
(Err(e), _) => Err(e),
|
||||||
_ => bail!("inconsistent text range"),
|
_ => bail!("inconsistent text range"),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue