Skip to content

Commit

Permalink
Merge pull request #498 from OMGeeky/fix-clippy-to-string-display
Browse files Browse the repository at this point in the history
Fix clippy complaining about "direct implementation of `ToString`"
  • Loading branch information
Byron authored May 16, 2024
2 parents ce47a46 + 70e5c03 commit f5e545f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions google-clis-common/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ use std::io;
use std::io::{stdout, Write};
use std::path::Path;
use std::str::FromStr;
use std::string::ToString;

use std::default::Default;
use std::fmt::Display;

const FIELD_SEP: char = '.';

Expand Down Expand Up @@ -125,9 +125,9 @@ impl AsRef<str> for CallType {
#[derive(Clone, Default)]
pub struct FieldCursor(Vec<String>);

impl ToString for FieldCursor {
fn to_string(&self) -> String {
self.0.join(".")
impl Display for FieldCursor {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
write!(f, "{}", self.0.join("."))
}
}

Expand Down

0 comments on commit f5e545f

Please sign in to comment.