Move the Block helper type to its own file
Collapse the various standalone functions for parsing block data, and refactor consumers to initialize a Block with given data and access its members as needed. Closes: https://github.com/damus-io/damus/pull/1496 Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
committed by
William Casarin
parent
6ab893a617
commit
286ae68fd6
@@ -27,7 +27,7 @@ func parsed_blocks_finish(bs: inout note_blocks, tags: TagsSequence?) -> Blocks
|
||||
while (i < bs.num_blocks) {
|
||||
let block = bs.blocks[i]
|
||||
|
||||
if let converted = convert_block(block, tags: tags) {
|
||||
if let converted = Block(block, tags: tags) {
|
||||
out.append(converted)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user