nim asked me to make this change? for memory safety reasons

This commit is contained in:
Daylin Morgan 2024-11-15 12:14:57 -06:00
parent f820cd86bc
commit 4a7336a6d2
Signed by: daylin
GPG key ID: 950D13E9719334AD

View file

@ -7,7 +7,7 @@ import packages, utils
export tables export tables
type type
Context* = object Context* = ref object
nimpkgs*: NimPkgs nimpkgs*: NimPkgs
loaded*: bool loaded*: bool
@ -18,7 +18,7 @@ let nimpkgsUrl =
else: "https://raw.githubusercontent.com/nimpkgs/nimpkgs/main/nimpkgs.json" 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) await fetch(nimpkgsUrl.jss)
.then((r: Response) => r.text()) .then((r: Response) => r.text())
.then(proc(txt: kstring) = .then(proc(txt: kstring) =