Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
pub fn optional_visibility(tokens: &mut TokenIter) -> Result<syn::Visibility, Error> {
// peek:
if let Some(TokenTree::Ident(ident)) = tokens.peek() {
- if ident.to_string() != "pub" {
+ if ident != "pub" {
return Ok(syn::Visibility::Inherited);
}
} else {
) -> Result<Span, Error> {
if let Some(tt) = tokens.next() {
if let TokenTree::Ident(ident) = tt {
- if ident.to_string() == keyword {
+ if ident == keyword {
return Ok(ident.span());
}
}