Skip to content

Commit

Permalink
Merge pull request #263 from Chasing1020/master
Browse files Browse the repository at this point in the history
clippy: fix warnings for redundant field names in struct initialization
  • Loading branch information
teawater authored Nov 4, 2024
2 parents a0e0d66 + 4b96229 commit d2a0ce1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions compiler/src/codegen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,7 @@ impl<'a> ServiceGen<'a> {
w.impl_self_block(&self.client_name(), |w| {
w.pub_fn("new(client: ::ttrpc::Client) -> Self", |w| {
w.expr_block(&self.client_name(), |w| {
w.field_entry("client", "client");
w.write_line("client,");
});
});

Expand All @@ -527,7 +527,7 @@ impl<'a> ServiceGen<'a> {
w.impl_self_block(&self.client_name(), |w| {
w.pub_fn("new(client: ::ttrpc::r#async::Client) -> Self", |w| {
w.expr_block(&self.client_name(), |w| {
w.field_entry("client", "client");
w.write_line("client,");
});
});

Expand Down

0 comments on commit d2a0ce1

Please sign in to comment.