From 8a77007872bcea933a66a4b813c1aea580b6120d Mon Sep 17 00:00:00 2001 From: Techatrix <19954306+Techatrix@users.noreply.github.com> Date: Thu, 22 Sep 2022 05:39:04 +0200 Subject: [PATCH] don't use inline for iterating builtin data --- src/Server.zig | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Server.zig b/src/Server.zig index 4c178bb..01eabd2 100644 --- a/src/Server.zig +++ b/src/Server.zig @@ -877,9 +877,9 @@ fn hoverDefinitionBuiltin(server: *Server, writer: anytype, id: types.RequestId, const name = identifierFromPosition(pos_index, handle.*); if (name.len == 0) return try respondGeneric(writer, id, null_result_response); - inline for (data.builtins) |builtin| { + for (data.builtins) |builtin| { if (std.mem.eql(u8, builtin.name[1..], name)) { - try send(writer, server.arena.allocator(), types.Response{ + return try send(writer, server.arena.allocator(), types.Response{ .id = id, .result = .{ .Hover = .{ @@ -895,6 +895,8 @@ fn hoverDefinitionBuiltin(server: *Server, writer: anytype, id: types.RequestId, }); } } + + return try respondGeneric(writer, id, null_result_response); } fn hoverDefinitionGlobal(server: *Server, writer: anytype, id: types.RequestId, pos_index: usize, handle: *DocumentStore.Handle) !void {