From 5772c3d78576bea11faaa5d44a0ebe432c80a3df Mon Sep 17 00:00:00 2001 From: Kitsu Date: Fri, 4 Dec 2020 02:02:06 +0300 Subject: [PATCH] Use specific rust version --- rust-toolchain | 1 + src/config/params.rs | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) create mode 100644 rust-toolchain diff --git a/rust-toolchain b/rust-toolchain new file mode 100644 index 0000000..9db5ea1 --- /dev/null +++ b/rust-toolchain @@ -0,0 +1 @@ +1.48.0 diff --git a/src/config/params.rs b/src/config/params.rs index 60bb75d..299a103 100644 --- a/src/config/params.rs +++ b/src/config/params.rs @@ -21,14 +21,14 @@ impl<'a> From<&'a Config> for InputTextParams { .input_text .as_ref() .and_then(|c| c.bg_color) - .or_else(|| config.bg_color) + .or(config.bg_color) .map(u32_to_solid_source) .unwrap_or_else(|| SolidSource::from_unpremultiplied_argb(0xc0, 0x75, 0x71, 0x5e)), font_color: config .input_text .as_ref() .and_then(|c| c.font_color) - .or_else(|| config.font_color) + .or(config.font_color) .map(u32_to_solid_source) .unwrap_or_else(default_font_color), } @@ -49,7 +49,7 @@ impl<'a> From<&'a Config> for ListParams { .list_items .as_ref() .and_then(|c| c.font_color) - .or_else(|| config.font_color) + .or(config.font_color) .map(u32_to_solid_source) .unwrap_or_else(default_font_color), selected_font_color: config