More let_else adoptions
This commit is contained in:
parent
d5f9c40e6a
commit
670f5c6ef3
10 changed files with 210 additions and 228 deletions
|
@ -47,11 +47,10 @@ use rls_data::{
|
|||
|
||||
use tracing::{debug, error};
|
||||
|
||||
#[rustfmt::skip] // https://github.com/rust-lang/rustfmt/issues/5213
|
||||
macro_rules! down_cast_data {
|
||||
($id:ident, $kind:ident, $sp:expr) => {
|
||||
let $id = if let super::Data::$kind(data) = $id {
|
||||
data
|
||||
} else {
|
||||
let super::Data::$kind($id) = $id else {
|
||||
span_bug!($sp, "unexpected data kind: {:?}", $id);
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue