move debug_dump to fmt::Debug

This commit is contained in:
Aleksey Kladov 2019-07-20 12:48:24 +03:00
parent e18f8495d6
commit 6d5d82e412
10 changed files with 42 additions and 50 deletions

View file

@ -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