Experimental browser for the Atmosphere
did you know? `#[serde(default = "some_func")` is a remnant of some old Rust limitations. Now we can do: `#[facet(default = some_func())]` (or just have any expression in there!)
Apr 29, 2025, 12:44 PM
{ "uri": "at://did:plc:dqrcz4py2hrv4lzcs6ygoagj/app.bsky.feed.post/3lnxcoukc6222", "cid": "bafyreifyl2wadbu34wql7dpt54wmrti7sfmpch33ion53ebzc6luefwzeq", "value": { "text": "did you know?\n\n`#[serde(default = \"some_func\")` is a remnant of some old Rust limitations.\n\nNow we can do:\n\n`#[facet(default = some_func())]` (or just have any expression in there!)", "$type": "app.bsky.feed.post", "embed": { "$type": "app.bsky.embed.images", "images": [ { "alt": "The compiler lets us know that we forgot to call default number in the expression that we assigned to default in facet(default). It suggests adding parenthesis, which is the correct fix.", "image": { "$type": "blob", "ref": { "$link": "bafkreie6flhwiv7w57nzxpnu63abe4e5f4upj3xdr6rz4yvljw5gxocy6y" }, "mimeType": "image/jpeg", "size": 490820 }, "aspectRatio": { "width": 2000, "height": 1061 } } ] }, "langs": [ "en" ], "createdAt": "2025-04-29T12:44:34.510Z" } }