Skip to content

Commit

Permalink
fix clippy lint
Browse files Browse the repository at this point in the history
  • Loading branch information
harrysolovay committed Oct 1, 2024
1 parent ad33d52 commit eb5c441
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/api/types.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
use std::fmt::Display;

use serde::Serialize;
use sqlx::Type;

Expand All @@ -23,12 +25,11 @@ pub enum TransactionStatus {
Failed,
}

impl ToString for TransactionStatus {
fn to_string(&self) -> String {
impl Display for TransactionStatus {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match self {
Self::Applied => "Applied",
Self::Failed => "Failed",
Self::Applied => write!(f, "Applied"),
Self::Failed => write!(f, "Failed"),
}
.to_string()
}
}

0 comments on commit eb5c441

Please sign in to comment.