From 353a7bbbc4f95cb15ee385c70843fd6102f82410 Mon Sep 17 00:00:00 2001 From: David Kellum Date: Fri, 12 Jan 2018 14:38:00 -0800 Subject: [PATCH] Use const for compat with rustc 1.13-16 Was using static but that's only supported as of rustc 1.17 (rust these older versions. Also continue using the copious explicit 'static lifetimes for the same compatibility, despite the clippy lint. --- src/datetime.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/datetime.rs b/src/datetime.rs index 2e6c194..a03b42b 100644 --- a/src/datetime.rs +++ b/src/datetime.rs @@ -287,7 +287,7 @@ impl DateTime where Tz::Offset: fmt::Display { use format::Fixed::*; use format::Fixed::Nanosecond; - static PREFIX: &[Item<'static>] = &[ + const PREFIX: &'static [Item<'static>] = &[ Numeric(Year, Zero), Literal("-"), Numeric(Month, Zero),