From f9127fb9221b8e07856530b3cc7fe4045ff94b2f Mon Sep 17 00:00:00 2001 From: shivshank Date: Wed, 25 Jul 2018 22:27:30 -0400 Subject: [PATCH] Add another Default impl for Config --- src/config.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/config.rs b/src/config.rs index edf9282..e9f05ce 100644 --- a/src/config.rs +++ b/src/config.rs @@ -23,6 +23,18 @@ pub struct Config { pub window_size: (f64, f64), } +impl<'a> Default for Config<&'a str> { + fn default() -> Self { + Config { + buffer_size: (0, 0), + resizable: false, + // :^) + window_title: "Super Mini GL Framebufferer 3!", + window_size: (600.0, 480.0), + } + } +} + impl Default for Config { fn default() -> Self { Config {