From 4a7336a6d2ce642304143b38d94d17d9195abeb5 Mon Sep 17 00:00:00 2001 From: Daylin Morgan Date: Fri, 15 Nov 2024 12:14:57 -0600 Subject: [PATCH] nim asked me to make this change? for memory safety reasons --- src/context.nim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/context.nim b/src/context.nim index 9d16355..f35c6f3 100644 --- a/src/context.nim +++ b/src/context.nim @@ -7,7 +7,7 @@ import packages, utils export tables type - Context* = object + Context* = ref object nimpkgs*: NimPkgs loaded*: bool @@ -18,7 +18,7 @@ let nimpkgsUrl = else: "https://raw.githubusercontent.com/nimpkgs/nimpkgs/main/nimpkgs.json" -proc fetchPackages*(ctx: var Context){.async.} = +proc fetchPackages*(ctx: Context){.async.} = await fetch(nimpkgsUrl.jss) .then((r: Response) => r.text()) .then(proc(txt: kstring) =