Dave Jones on Nostr: I use this pattern a lot, to keep things immutable but still have a default value ...
I use this pattern a lot, to keep things immutable but still have a default value assigned to a variable that must exist later, and make it explicit what's being done.
Is there a more Rusty way to do this and still keep things clear/readable?
Published at
2024-01-18 04:34:40Event JSON
{
"id": "08182d08b416352db1817a6179ab02515a0da06565de1f5467211bc38562994f",
"pubkey": "01b564093b88a80fa5269f27044e1dea1d832f56f9b40f2064a6ba39506f27e2",
"created_at": 1705552480,
"kind": 1,
"tags": [
[
"proxy",
"https://podcastindex.social/users/dave/statuses/111775087362356260",
"activitypub"
]
],
"content": "I use this pattern a lot, to keep things immutable but still have a default value assigned to a variable that must exist later, and make it explicit what's being done.\n\nIs there a more Rusty way to do this and still keep things clear/readable?\n\nhttps://cdn.masto.host/podcastindexsocial/media_attachments/files/111/775/078/183/428/602/original/ba7f6246d7e7bbbc.png",
"sig": "caae6dc8b8fe599ad7351c81eefb33f452d7b33284702b988445a23b705e9b01215ebad68b363da457c8cd8ce106560afb82e8ad7926bd3dd45eaaf60c4edc7b"
}