prs on Nostr: Move the Block helper type to its own file (#1496) Move the Block helper type to its ...
Move the Block helper type to its own file (#1496)
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. This is a more "idiomatic" approach to these C-backed data structures, and moves a number of these functions, extensions, and types into `fileprivate` scope, removing them from the global symbols and generally cleaning up their interface and usage. I plan to continue these "cleanup and refactor" changes as I learn more about the repository.
refactor/block-initializer, 1 commits
https://github.com/damus-io/damus/pull/1496Published at
2023-08-21 21:28:14Event JSON
{
"id": "455bbd0ee6cdcbefdf570942456e34053378a0640c110763d6ef887e484e1190",
"pubkey": "edf16b1dd61eab353a83af470cc13557029bff6827b4cb9b7fc9bdb632a2b8e6",
"created_at": 1692653294,
"kind": 1,
"tags": [
[
"p",
"32e1827635450ebb3c5a7d12c1f8e7b2b514439ac10a67eef3d9fd9c5c68e245"
],
[
"t",
"damuspr"
]
],
"content": "Move the Block helper type to its own file (#1496)\n\nMove 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. This is a more \"idiomatic\" approach to these C-backed data structures, and moves a number of these functions, extensions, and types into `fileprivate` scope, removing them from the global symbols and generally cleaning up their interface and usage. I plan to continue these \"cleanup and refactor\" changes as I learn more about the repository.\n\nrefactor/block-initializer, 1 commits\n\nhttps://github.com/damus-io/damus/pull/1496",
"sig": "10e0ee2b7a07132069588e0dbe1d1fa744d75192ef274203b6cf08e13d338c3c31f4c2ea3708bfbd1f7ff128971f0bdc1af1f70350d1d6f74aadcca464aba8af"
}