1
Fork 0

Inline and remove TokenTree::{open_tt,close_tt}.

They both have a single call site.
This commit is contained in:
Nicholas Nethercote 2022-04-13 16:18:01 +10:00
parent ad566b78f2
commit aefbbeec34
2 changed files with 2 additions and 12 deletions

View file

@ -94,16 +94,6 @@ impl TokenTree {
TokenTree::Token(Token::new(kind, span))
}
/// Returns the opening delimiter as a token tree.
pub fn open_tt(span: DelimSpan, delim: DelimToken) -> TokenTree {
TokenTree::token(token::OpenDelim(delim), span.open)
}
/// Returns the closing delimiter as a token tree.
pub fn close_tt(span: DelimSpan, delim: DelimToken) -> TokenTree {
TokenTree::token(token::CloseDelim(delim), span.close)
}
pub fn uninterpolate(self) -> TokenTree {
match self {
TokenTree::Token(token) => TokenTree::Token(token.uninterpolate().into_owned()),