moves initializer around to prevent circ deps

This commit is contained in:
Marcin Czenko 2025-03-12 02:59:45 +01:00
parent fe1cc15fbd
commit ff04de52da
No known key found for this signature in database
GPG Key ID: 33DEA0C8E30937C0
2 changed files with 5 additions and 6 deletions

View File

@ -258,3 +258,8 @@ func decode*(_: type Manifest, blk: Block): ?!Manifest =
return failure "Cid not a manifest codec"
Manifest.decode(blk.data)
func new*(T: type Manifest, data: openArray[byte]): ?!Manifest =
## Create a manifest instance from given data
##
Manifest.decode(data)

View File

@ -366,9 +366,3 @@ func new*(
filename: manifest.filename,
mimetype: manifest.mimetype,
)
func new*(T: type Manifest, data: openArray[byte]): ?!Manifest =
## Create a manifest instance from given data
##
Manifest.decode(data)