Sylvain Wallez on Nostr: TIL on-stack dynamic dispatch in Rust. This works because the compiler inserts a flag ...
Published at
2024-04-07 13:34:31Event JSON
{
"id": "c4177e6b3bba4eccaaa404242154969dca8b6f774cfe05a05ae4e00c2e9c8b53",
"pubkey": "66689df4ea136f4cfaedf0fb5311bbcc6244fa24e059286568bb18080e7e7dfd",
"created_at": 1712496871,
"kind": 1,
"tags": [
[
"t",
"rustlang"
],
[
"proxy",
"https://mastodon.tetaneutral.net/users/swallez/statuses/112230195000005196",
"activitypub"
]
],
"content": "TIL on-stack dynamic dispatch in Rust. This works because the compiler inserts a flag to know whether it should drop the File object (checked with the Compiler Explorer). Pretty cool! #RustLang https://rust-unofficial.github.io/patterns/idioms/on-stack-dyn-dispatch.html",
"sig": "20892a642bdea3f32375b0009d9c11c5545a891f2daf57304c7a5398e8c3cae76b3fc286dcb7b29fcf66c220554bdafbb1631df466866db6bb68f6a2202e466a"
}