Skip to content

Commit d2a0ce1

Browse files
author
Hui Zhu
authored
Merge pull request #263 from Chasing1020/master
clippy: fix warnings for redundant field names in struct initialization
2 parents a0e0d66 + 4b96229 commit d2a0ce1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

compiler/src/codegen.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -505,7 +505,7 @@ impl<'a> ServiceGen<'a> {
505505
w.impl_self_block(&self.client_name(), |w| {
506506
w.pub_fn("new(client: ::ttrpc::Client) -> Self", |w| {
507507
w.expr_block(&self.client_name(), |w| {
508-
w.field_entry("client", "client");
508+
w.write_line("client,");
509509
});
510510
});
511511

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

0 commit comments

Comments
 (0)