mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 05:15:04 +00:00
move debug_dump to fmt::Debug
This commit is contained in:
parent
e18f8495d6
commit
6d5d82e412
10 changed files with 42 additions and 50 deletions
|
@ -25,9 +25,9 @@ pub(crate) fn syntax_tree(
|
|||
}
|
||||
};
|
||||
|
||||
node.debug_dump()
|
||||
format!("{:#?}", node)
|
||||
} else {
|
||||
parse.tree().syntax().debug_dump()
|
||||
format!("{:#?}", parse.tree().syntax())
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -85,7 +85,7 @@ fn syntax_tree_for_token(node: &SyntaxToken, text_range: TextRange) -> Option<St
|
|||
// If the "file" parsed without errors,
|
||||
// return its syntax
|
||||
if parsed.errors().is_empty() {
|
||||
return Some(parsed.tree().syntax().debug_dump());
|
||||
return Some(format!("{:#?}", parsed.tree().syntax()));
|
||||
}
|
||||
|
||||
None
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue