Add missing lifetimes (#282)
This commit is contained in:
parent
dc78b67008
commit
1587d10dc8
@ -114,7 +114,7 @@ pub enum Attribute {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl Display for 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))?;
|
write!(f, "{}", SetAttr(*self))?;
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
@ -29,7 +29,7 @@ pub enum Colored {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl Display for 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();
|
let colored_terminal = color();
|
||||||
|
|
||||||
match *self {
|
match *self {
|
||||||
|
@ -52,7 +52,7 @@ impl<'a, D: Display + 'a + Clone> StyledObject<D> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl<D: Display + Clone> Display for StyledObject<D> {
|
impl<D: Display + Clone> Display for StyledObject<D> {
|
||||||
fn fmt(&self, f: &mut Formatter) -> result::Result<(), fmt::Error> {
|
fn fmt(&self, f: &mut Formatter<'_>) -> result::Result<(), fmt::Error> {
|
||||||
let mut reset = false;
|
let mut reset = false;
|
||||||
|
|
||||||
if let Some(bg) = self.object_style.bg_color {
|
if let Some(bg) = self.object_style.bg_color {
|
||||||
|
@ -179,7 +179,7 @@ macro_rules! execute {
|
|||||||
macro_rules! impl_display {
|
macro_rules! impl_display {
|
||||||
(for $($t:ty),+) => {
|
(for $($t:ty),+) => {
|
||||||
$(impl ::std::fmt::Display for $t {
|
$(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;
|
use $crate::Command;
|
||||||
write!(f, "{}", self.ansi_code())
|
write!(f, "{}", self.ansi_code())
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user