Module merge_imports

Module merge_imports 

Source
Expand description

Handle syntactic aspects of merging UseTrees.

Modulesยง

version_sort ๐Ÿ”’

Enumsยง

MergeBehavior
What type of merges are allowed.
NormalizationStyle
Style to follow when normalizing a use tree.

Functionsยง

common_prefix
Traverses both paths until they differ, returning the common prefix of both.
eq_attrs
eq_visibility
get_single_subtree ๐Ÿ”’
path_is_self ๐Ÿ”’
path_len ๐Ÿ”’
path_segment_cmp ๐Ÿ”’
recursive_merge ๐Ÿ”’
Recursively merges rhs to lhs
recursive_normalize ๐Ÿ”’
Recursively normalizes a use tree and its subtrees (if any).
remove_subtree_if_only_self ๐Ÿ”’
try_merge_imports
Merge rhs into lhs keeping both intact. Returned AST is mutable.
try_merge_trees
Merge rhs into lhs keeping both intact. Returned AST is mutable.
try_merge_trees_mut ๐Ÿ”’
try_normalize_import
Normalizes a use item by:
try_normalize_use_tree
Normalizes a use tree (see try_normalize_import doc).
try_normalize_use_tree_mut
use_tree_cmp ๐Ÿ”’
Orders use trees following rustfmtโ€™s version sorting algorithm for ordering imports.
use_tree_cmp_bin_search ๐Ÿ”’
Use tree comparison func for binary searching for merging.
use_tree_cmp_by_tree_list_glob_or_alias ๐Ÿ”’
Orders for use trees with equal paths (see use_tree_cmp for details about use tree ordering).