Skip to content

Commit

Permalink
fmt: fmt code
Browse files Browse the repository at this point in the history
Signed-off-by: He1pa <[email protected]>
  • Loading branch information
He1pa committed Oct 11, 2023
1 parent 6e0b09b commit b77864d
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions kclvm/tools/src/LSP/src/goto_def.rs
Original file line number Diff line number Diff line change
Expand Up @@ -338,8 +338,8 @@ pub(crate) fn resolve_var(
if names.len() == 2 {
let func_name_node = node_names[1].clone();
let func_name = func_name_node.node.clone();
match STRING_MEMBER_FUNCTIONS.get(&func_name) {
Some(ty) => match &ty.kind {
if let Some(ty) = STRING_MEMBER_FUNCTIONS.get(&func_name) {
match &ty.kind {
kclvm_sema::ty::TypeKind::Function(func_ty) => {
return Some(Definition::Object(ScopeObject {
name: func_name,
Expand All @@ -352,8 +352,7 @@ pub(crate) fn resolve_var(
}
// unreachable
_ => {}
},
None => {}
}
}
}
None
Expand Down

0 comments on commit b77864d

Please sign in to comment.