Skip to content

Commit

Permalink
Merge branch 'i1450' into i1452
Browse files Browse the repository at this point in the history
  • Loading branch information
leighmcculloch committed Jul 15, 2024
2 parents 7353a1e + 98f1b2b commit 624e20a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
6 changes: 6 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ rustflags = [
"-Aclippy::must_use_candidate",
"-Aclippy::missing_panics_doc",
"-Aclippy::missing_errors_doc",

# Disable doc-markdown because it asks for backticks to be added around text
# that shouldn't be surrounded by backticks.
# https://github.com/rust-lang/rust-clippy/issues/13097
"-A clippy::doc-markdown",

# "-Aclippy::missing_safety_doc",
# "-Aclippy::inline_always",
# "-Aclippy::default_trait_access",
Expand Down
8 changes: 5 additions & 3 deletions cmd/soroban-cli/src/toid.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
use std::fmt::Display;

/// A barebones implementation of Total Order IDs (TOIDs) from
/// [SEP-35](https://stellar.org/protocol/sep-35), using the reference
/// implementation from the Go
Expand Down Expand Up @@ -61,9 +63,9 @@ impl From<Toid> for u64 {
}
}

impl ToString for Toid {
fn to_string(&self) -> String {
impl Display for Toid {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let u: u64 = (*self).into();
u.to_string()
write!(f, "{u}")
}
}

0 comments on commit 624e20a

Please sign in to comment.