diff --git a/google-clis-common/src/lib.rs b/google-clis-common/src/lib.rs index 36ebec625a..82dc9f16c9 100644 --- a/google-clis-common/src/lib.rs +++ b/google-clis-common/src/lib.rs @@ -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 = '.'; @@ -125,9 +125,9 @@ impl AsRef for CallType { #[derive(Clone, Default)] pub struct FieldCursor(Vec); -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(".")) } }