Moved a calculation out of a loop

This commit is contained in:
Alexandros Naskos 2020-05-19 22:33:15 +03:00
parent 558f5d5067
commit 61b8fd5259

View File

@ -125,8 +125,8 @@ fn removeOldImports(self: *DocumentStore, handle: *Handle, zig_lib_path: ?[]cons
ex.* = false;
}
const std_uri = try stdUriFromLibPath(&arena.allocator, zig_lib_path);
for (import_strs.items) |str| {
const std_uri = try stdUriFromLibPath(&arena.allocator, zig_lib_path);
const uri = (try uriFromImportStr(self, &arena.allocator, handle.*, str, std_uri)) orelse continue;
var idx: usize = 0;