syntax: Fix warnings about clippy str_to_string rule

This commit is contained in:
Tetsuharu Ohzeki 2024-02-10 00:51:58 +09:00
parent f474bd77be
commit 81c35d1f56
6 changed files with 14 additions and 14 deletions

View file

@ -432,7 +432,7 @@ fn api_walkthrough() {
WalkEvent::Enter(node) => {
let text = match &node {
NodeOrToken::Node(it) => it.text().to_string(),
NodeOrToken::Token(it) => it.text().to_string(),
NodeOrToken::Token(it) => it.text().to_owned(),
};
format_to!(buf, "{:indent$}{:?} {:?}\n", " ", text, node.kind(), indent = indent);
indent += 2;