From c70205501d2f0732c28682281aed1d52fd6146cd Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Sun, 23 Aug 2015 12:36:01 +0200 Subject: [PATCH] Use `State::default()` directly, instead of per-member. The example is sightly simplified that way, even though showing the `..` notation for struct field initialization is probably a good thing to do as well just for the learning experience. --- examples/test_window.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/examples/test_window.rs b/examples/test_window.rs index c053083..a350a0b 100644 --- a/examples/test_window.rs +++ b/examples/test_window.rs @@ -87,9 +87,7 @@ impl Default for AutoResizeState { } fn main() { - let mut state = State { - .. Default::default() - }; + let mut state = State::default(); let mut support = Support::init(); let mut opened = true;