Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add syntax sugar for struct fields #56

Merged
merged 1 commit into from
May 9, 2024

Conversation

RunDevelopment
Copy link
Member

Instead of

let width = ...;
let height = ...;
Image { width: width, height: height, channels: 3 }

we can now write

let width = ...;
let height = ...;
Image { width, height, channels: 3 }

This is obviously inspired by languages such as Rust and JavaScript where this is also allowed.

@RunDevelopment RunDevelopment merged commit 897fecb into main May 9, 2024
3 checks passed
@RunDevelopment RunDevelopment deleted the struct-field-syntax-sugar branch May 9, 2024 17:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant