Elektrine lite

← Feed

@shanecelis@mastodon.gamedev.place

Post #1398733

2024-03-24 11:03 UTC

TIL in rust you can construct a positional struct using a field struct expression. The indices can even be in arbitrary order. #rustlang

Replies (1)

  • @dpom@fosstodon.org 2024-03-24 11:14

    @shanecelis This post is making me realize my subconscious bias toward only using a tuple struct when it has 1 field. I actually don't think I've ever constructed a tuple struct with 2+ fields.

    Open ##1470055