internal: remove useless helpers
We generally avoid "syntax only" helper wrappers, which don't do much: they make code easier to write, but harder to read. They also make investigations harder, as "find_usages" needs to be invoked both for the wrapped and unwrapped APIs
This commit is contained in:
@@ -191,7 +191,7 @@ mod tests {
|
||||
use super::*;
|
||||
|
||||
use cfg::CfgExpr;
|
||||
use mbe::ast_to_token_tree;
|
||||
use mbe::syntax_node_to_token_tree;
|
||||
use syntax::{
|
||||
ast::{self, AstNode},
|
||||
SmolStr,
|
||||
@@ -201,7 +201,7 @@ mod tests {
|
||||
let cfg_expr = {
|
||||
let source_file = ast::SourceFile::parse(cfg).ok().unwrap();
|
||||
let tt = source_file.syntax().descendants().find_map(ast::TokenTree::cast).unwrap();
|
||||
let (tt, _) = ast_to_token_tree(&tt);
|
||||
let (tt, _) = syntax_node_to_token_tree(tt.syntax());
|
||||
CfgExpr::parse(&tt)
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user