Skip to content

Commit

Permalink
CIs update rust version to 1.78 today. Fix error
Browse files Browse the repository at this point in the history
  • Loading branch information
cottinisimone committed May 16, 2024
1 parent e47aa67 commit 711a6df
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions positional/src/field.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
use std::fmt::Display;
use pad::{Alignment, PadStr};

#[doc(hidden)]
Expand Down Expand Up @@ -46,9 +47,9 @@ impl PositionalField {
}
}

impl ToString for PositionalField {
fn to_string(&self) -> String {
self.value.pad(self.size, self.filler, self.alignment, true)
impl Display for PositionalField {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "{}", self.value.pad(self.size, self.filler, self.alignment, true))
}
}

Expand Down

0 comments on commit 711a6df

Please sign in to comment.