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 { fn getDocumentSymbolsInternal(allocator: *std.mem.Allocator, tree: *ast.Tree, node: *ast.Node, context: *GetDocumentSymbolsContext) anyerror!void {
const name = if (getDeclName(tree, node)) |name| const name = getDeclName(tree, node) orelse return;
name
else
return;
if (name.len == 0) if (name.len == 0)
return; return;