From 6126258a2947cf3421c1c84634b307517a93505b Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Mon, 22 Nov 2021 22:54:43 +0100 Subject: get rid of useless lifetimes --- src/lib.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/lib.rs b/src/lib.rs index 18e554d..213d58c 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -127,7 +127,7 @@ const PALETTE_SIZE: usize = 16; const PALETTE_BYTES: usize = PALETTE_SIZE * 3; /* 16 * sizeof(int) */ const RAW_COLEXPR_SIZE: usize = 6; /* e. g. 0xBADF00 */ -pub type RawPalette<'a> = [u32; PALETTE_SIZE]; +pub type RawPalette = [u32; PALETTE_SIZE]; #[derive(Debug)] pub enum Color @@ -211,7 +211,7 @@ impl fmt::Display for Color pub struct Builtin { names: &'static [&'static str], - palette: &'static RawPalette<'static>, + palette: &'static RawPalette, } /** Vanilla Linux colors. */ @@ -329,7 +329,7 @@ pub enum Scheme Custom(Option), } -impl<'a> fmt::Display for Scheme +impl fmt::Display for Scheme { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { @@ -629,9 +629,9 @@ impl TryFrom<&Scheme> for Palette } /** Obtain a ``Palette`` from a ``RawPalette``. */ -impl From<&RawPalette<'_>> for Palette +impl From<&RawPalette> for Palette { - fn from(colors: &RawPalette<'_>) -> Self + fn from(colors: &RawPalette) -> Self { let mut idx: usize = 0; let mut pal: [u8; PALETTE_BYTES] = [0; PALETTE_BYTES]; -- cgit v1.2.3