Skip to main content

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
flatten_one_style_tree ๐Ÿ”’
get_single_subtree ๐Ÿ”’
make_use_tree_from_list ๐Ÿ”’
make_use_tree_from_parts ๐Ÿ”’
make_use_tree_list ๐Ÿ”’
make_use_with_tree ๐Ÿ”’
merge_single_subtree_into_parent_tree ๐Ÿ”’
one_style_tree_list ๐Ÿ”’
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 ๐Ÿ”’
split_prefix ๐Ÿ”’
try_merge_imports
Merge rhs into lhs keeping both intact.
try_merge_trees
Merge rhs into lhs keeping both intact.
try_merge_trees_with_factory ๐Ÿ”’
try_normalize_import
Normalizes a use item by:
try_normalize_use_tree ๐Ÿ”’
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).
with_use_tree_list ๐Ÿ”’
wrap_in_tree_list ๐Ÿ”’