Small code cleanup

This commit is contained in:
Alexandros Naskos 2020-07-24 13:04:01 +03:00
parent bda78e1f76
commit d8510b3099

View File

@ -1445,11 +1445,7 @@ const GetDocumentSymbolsContext = struct {
};
fn getDocumentSymbolsInternal(allocator: *std.mem.Allocator, tree: *ast.Tree, node: *ast.Node, context: *GetDocumentSymbolsContext) anyerror!void {
const name = if (getDeclName(tree, node)) |name|
name
else
return;
const name = getDeclName(tree, node) orelse return;
if (name.len == 0)
return;