Skip to content

Commit

Permalink
CIs update rust version to 1.78 today. Fix error (#68)
Browse files Browse the repository at this point in the history
* CIs update rust version to 1.78 today. Fix error

* Reformat
  • Loading branch information
cottinisimone authored May 16, 2024
1 parent e47aa67 commit 3535499
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions positional/src/field.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
use pad::{Alignment, PadStr};
use std::fmt::Display;

#[doc(hidden)]

Expand Down Expand Up @@ -46,9 +47,13 @@ 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 3535499

Please sign in to comment.