Byron / google-apis-rs

A binding and CLI generator for all Google APIs
http://byron.github.io/google-apis-rs
Other
1.02k stars 135 forks source link

Fix clippy complaining about "direct implementation of `ToString`" #498

Closed OMGeeky closed 4 months ago

OMGeeky commented 4 months ago

The clippy action currently fails due to a direct implementation fo ToString instead of Display

The error message is:

error: direct implementation of `ToString`
   --> google-clis-common/src/lib.rs:128:1
    |
    | / impl ToString for FieldCursor {
    | |     fn to_string(&self) -> String {
    | |         self.0.join(".")
    | |     }
    | | }
    | |_^
    |
    = help: prefer implementing `Display` instead
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_trait_impl
    = note: `-D clippy::to-string-trait-impl` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(clippy::to_string_trait_impl)]`