mirror of
https://github.com/daylinmorgan/nimpkgs.git
synced 2024-11-16 08:08:32 -06:00
nim asked me to make this change? for memory safety reasons
This commit is contained in:
parent
f820cd86bc
commit
4a7336a6d2
1 changed files with 2 additions and 2 deletions
|
@ -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) =
|
||||||
|
|
Loading…
Reference in a new issue