Remove Lit::from_included_bytes
.
`Lit::from_included_bytes` calls `Lit::from_lit_kind`, but the two call sites only need the resulting `token::Lit`, not the full `ast::Lit`. This commit changes those call sites to use `LitKind::to_token_lit`, which means `from_included_bytes` can be removed.
This commit is contained in:
parent
8c6bf2bee7
commit
8cfc8153da
3 changed files with 4 additions and 12 deletions
|
@ -328,8 +328,8 @@ impl<'a> State<'a> {
|
|||
self.print_token_literal(token_lit, expr.span);
|
||||
}
|
||||
ast::ExprKind::IncludedBytes(ref bytes) => {
|
||||
let lit = ast::Lit::from_included_bytes(bytes, expr.span);
|
||||
self.print_literal(&lit)
|
||||
let lit = ast::LitKind::ByteStr(bytes.clone()).to_token_lit();
|
||||
self.print_token_literal(lit, expr.span)
|
||||
}
|
||||
ast::ExprKind::Cast(ref expr, ref ty) => {
|
||||
let prec = AssocOp::As.precedence() as i8;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue