Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unnecessary lifetime from Formatter #3178

Merged
merged 1 commit into from
Feb 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion crates/ordinals/src/rarity.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ impl TryFrom<u8> for Rarity {
}

impl Display for Rarity {
fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
fn fmt(&self, f: &mut Formatter) -> fmt::Result {
write!(
f,
"{}",
Expand Down
4 changes: 2 additions & 2 deletions crates/ordinals/src/sat.rs
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ pub struct Error {
}

impl Display for Error {
fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
fn fmt(&self, f: &mut Formatter) -> fmt::Result {
write!(f, "failed to parse sat `{}`: {}", self.input, self.kind)
}
}
Expand Down Expand Up @@ -263,7 +263,7 @@ impl ErrorKind {
}

impl Display for ErrorKind {
fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
fn fmt(&self, f: &mut Formatter) -> fmt::Result {
match self {
Self::IntegerRange => write!(f, "invalid integer range"),
Self::NameRange => write!(f, "invalid name range"),
Expand Down
2 changes: 1 addition & 1 deletion src/decimal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ impl Decimal {
}

impl Display for Decimal {
fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
fn fmt(&self, f: &mut Formatter) -> fmt::Result {
let magnitude = 10u128.pow(self.scale.into());

let integer = self.value / magnitude;
Expand Down
2 changes: 1 addition & 1 deletion src/index/reorg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ pub(crate) enum ReorgError {
}

impl Display for ReorgError {
fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
fn fmt(&self, f: &mut Formatter) -> fmt::Result {
match self {
ReorgError::Recoverable { height, depth } => {
write!(f, "{depth} block deep reorg detected at height {height}")
Expand Down
14 changes: 7 additions & 7 deletions src/inscriptions/media.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ impl Display for Language {
f,
"{}",
match self {
Css => "css",
JavaScript => "javascript",
Json => "json",
Python => "python",
Yaml => "yaml",
Self::Css => "css",
Self::JavaScript => "javascript",
Self::Json => "json",
Self::Python => "python",
Self::Yaml => "yaml",
}
)
}
Expand All @@ -60,8 +60,8 @@ impl Display for ImageRendering {
f,
"{}",
match self {
Auto => "auto",
Pixelated => "pixelated",
Self::Auto => "auto",
Self::Pixelated => "pixelated",
}
)
}
Expand Down
2 changes: 1 addition & 1 deletion src/outgoing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ pub enum Outgoing {
}

impl Display for Outgoing {
fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
fn fmt(&self, f: &mut Formatter) -> fmt::Result {
match self {
Self::Amount(amount) => write!(f, "{}", amount.to_string().to_lowercase()),
Self::InscriptionId(inscription_id) => inscription_id.fmt(f),
Expand Down
2 changes: 1 addition & 1 deletion src/wallet/transaction_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ pub enum Target {
}

impl Display for Error {
fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
fn fmt(&self, f: &mut Formatter) -> fmt::Result {
match self {
Error::Dust {
output_value,
Expand Down
Loading