Skip to content

Commit b70d09d

Browse files
committed
accept make::ext:path_from_indents for Syntaxfactory constructor and add mapping for token tree from node constructor
1 parent 29b20da commit b70d09d

1 file changed

Lines changed: 1 addition & 7 deletions

File tree

crates/syntax/src/ast/syntax_factory/constructors.rs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2053,13 +2053,7 @@ impl SyntaxFactory {
20532053
&self,
20542054
parts: impl IntoIterator<Item = &'a str>,
20552055
) -> Option<ast::Path> {
2056-
let mut iter = parts.into_iter();
2057-
let base = self.ident_path(iter.next()?);
2058-
let path = iter.fold(base, |base, s| {
2059-
let segment = self.ident_path(s);
2060-
self.path_concat(base, segment)
2061-
});
2062-
Some(path)
2056+
make::ext::path_from_idents(parts).map(|path| path.clone_for_update())
20632057
}
20642058

20652059
pub fn token_tree_from_node(&self, node: &SyntaxNode) -> ast::TokenTree {

0 commit comments

Comments
 (0)