From 1b980bc6e823b7e049f5bb86d039e3b7db5ce353 Mon Sep 17 00:00:00 2001 From: Kaiden42 Date: Wed, 19 Aug 2020 01:30:22 +0200 Subject: [PATCH] Implement From for Option --- core/src/background.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/core/src/background.rs b/core/src/background.rs index e1a37ddc..54a9cad2 100644 --- a/core/src/background.rs +++ b/core/src/background.rs @@ -13,3 +13,9 @@ impl From for Background { Background::Color(color) } } + +impl From for Option { + fn from(color: Color) -> Self { + Some(Background::from(color)) + } +} \ No newline at end of file