Skip to content

Instantly share code, notes, and snippets.

@rust-play
Created December 2, 2020 19:00
Code shared from the Rust Playground
#![allow(dead_code)]
#[non_exhaustive]
#[derive(Default)]
struct Foo {
a: i32,
b: i32,
}
fn main() {
let _ = Foo { a: 123, b: 456 };
let _ = Foo {
a: 123,
..Foo::default()
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment