From 1587d10dc8c112ff2b59dc8a467ca91dd9c1aa73 Mon Sep 17 00:00:00 2001 From: Canop Date: Wed, 23 Oct 2019 15:02:20 +0200 Subject: [PATCH] Add missing lifetimes (#282) --- src/style/enums/attribute.rs | 2 +- src/style/enums/colored.rs | 2 +- src/style/styledobject.rs | 2 +- src/utils/macros.rs | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/style/enums/attribute.rs b/src/style/enums/attribute.rs index 116e5cf..800435f 100644 --- a/src/style/enums/attribute.rs +++ b/src/style/enums/attribute.rs @@ -114,7 +114,7 @@ pub enum Attribute { } impl Display for Attribute { - fn fmt(&self, f: &mut ::std::fmt::Formatter) -> std::result::Result<(), std::fmt::Error> { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> { write!(f, "{}", SetAttr(*self))?; Ok(()) } diff --git a/src/style/enums/colored.rs b/src/style/enums/colored.rs index 1f4343d..e77cc80 100644 --- a/src/style/enums/colored.rs +++ b/src/style/enums/colored.rs @@ -29,7 +29,7 @@ pub enum Colored { } impl Display for Colored { - fn fmt(&self, _f: &mut ::std::fmt::Formatter) -> std::result::Result<(), std::fmt::Error> { + fn fmt(&self, _f: &mut ::std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> { let colored_terminal = color(); match *self { diff --git a/src/style/styledobject.rs b/src/style/styledobject.rs index 1039352..685ca81 100644 --- a/src/style/styledobject.rs +++ b/src/style/styledobject.rs @@ -52,7 +52,7 @@ impl<'a, D: Display + 'a + Clone> StyledObject { } impl Display for StyledObject { - fn fmt(&self, f: &mut Formatter) -> result::Result<(), fmt::Error> { + fn fmt(&self, f: &mut Formatter<'_>) -> result::Result<(), fmt::Error> { let mut reset = false; if let Some(bg) = self.object_style.bg_color { diff --git a/src/utils/macros.rs b/src/utils/macros.rs index a04ecd2..4363d21 100644 --- a/src/utils/macros.rs +++ b/src/utils/macros.rs @@ -179,7 +179,7 @@ macro_rules! execute { macro_rules! impl_display { (for $($t:ty),+) => { $(impl ::std::fmt::Display for $t { - fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::result::Result<(), ::std::fmt::Error> { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::result::Result<(), ::std::fmt::Error> { use $crate::Command; write!(f, "{}", self.ansi_code()) }