containerd / ttrpc-rust

Rust implementation of ttrpc (GRPC for low-memory environments)
Apache License 2.0
197 stars 47 forks source link

clippy: fix warnings for redundant field names in struct initialization #263

Closed Chasing1020 closed 1 week ago

Chasing1020 commented 2 weeks ago

Refactor codegen.rs to use write_line instead of field_entry for client initialization.

An example of this:

warning: redundant field names in struct initialization
  --> xxx_ttrpc.rs
   |
   |             client: client,
   |             ^^^^^^^^^^^^^^ help: replace it with: `client`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names
   = note: `#[warn(clippy::redundant_field_names)]` on by default