Skip to content

Commit

Permalink
fix clippy
Browse files Browse the repository at this point in the history
Signed-off-by: Runji Wang <wangrunji0408@163.com>
  • Loading branch information
wangrunji0408 committed May 7, 2024
1 parent 35f47f7 commit cb8d72d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion madsim-etcd-client/src/election.rs
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ impl ProclaimOptions {
}

/// Leader key of election
#[derive(Debug, Clone)]
#[derive(Debug, Clone, Default)]
pub struct LeaderKey {
pub(crate) name: Bytes,
pub(crate) key: Bytes,
Expand Down
6 changes: 3 additions & 3 deletions madsim/src/sim/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ impl FromStr for Config {
}

/// Print the config into TOML.
impl ToString for Config {
fn to_string(&self) -> String {
toml::to_string_pretty(self).unwrap()
impl std::fmt::Display for Config {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "{}", toml::to_string_pretty(self).unwrap())
}
}

Expand Down

0 comments on commit cb8d72d

Please sign in to comment.