Skip to content

Commit

Permalink
Remove dead code from ImplItemFn's ToTokens
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed Mar 24, 2023
1 parent 5036fd9 commit 280d5e4
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions src/item.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3149,14 +3149,6 @@ mod printing {
self.vis.to_tokens(tokens);
self.defaultness.to_tokens(tokens);
self.sig.to_tokens(tokens);
if self.block.stmts.len() == 1 {
if let Stmt::Item(Item::Verbatim(verbatim)) = &self.block.stmts[0] {
if verbatim.to_string() == ";" {
verbatim.to_tokens(tokens);
return;
}
}
}
self.block.brace_token.surround(tokens, |tokens| {
tokens.append_all(self.attrs.inner());
tokens.append_all(&self.block.stmts);
Expand Down

0 comments on commit 280d5e4

Please sign in to comment.