rust/crates/assists/src/handlers
bors[bot] 568dc38b7b
Merge #5955
5955: Remove merge import code duplication r=jonas-schievink a=Veykril

This removes the code duplication caused by #5935, this also allows the assist to merge imports that have equal visibility and prevents merges of unequal visibility. This PR also fixes an iteration mistake in the mentioned PR:

Turns out I made a mistake when writing the `segment_iter` function, I was assuming that the `children` of a path will just be the segments, which is obviously not the case. This also brings insertion order of shorter paths in line with how `rustfmt` orders them.

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2020-09-11 14:01:20 +00:00
..
add_custom_impl.rs Rename ra_assists -> assists 2020-08-13 17:33:38 +02:00
add_explicit_type.rs Rename ra_assists -> assists 2020-08-13 17:33:38 +02:00
add_missing_impl_members.rs fixup whitespace when adding missing impl items 2020-08-14 16:10:52 +03:00
add_turbo_fish.rs Rename ra_assists -> assists 2020-08-13 17:33:38 +02:00
apply_demorgan.rs Rename ra_assists -> assists 2020-08-13 17:33:38 +02:00
auto_import.rs Fix import insertion breaking nested modules 2020-09-03 18:36:08 +02:00
change_return_type_to_result.rs Rename ra_assists -> assists 2020-08-13 17:33:38 +02:00
change_visibility.rs Rename ra_assists -> assists 2020-08-13 17:33:38 +02:00
early_return.rs Rename ra_assists -> assists 2020-08-13 17:33:38 +02:00
expand_glob_import.rs Reduce path_from_text usage 2020-08-31 15:47:42 +02:00
extract_struct_from_enum_variant.rs Add extra insert_use test for pub(crate) re-export handling 2020-09-03 20:26:27 +02:00
extract_variable.rs Rename ra_assists -> assists 2020-08-13 17:33:38 +02:00
fill_match_arms.rs Rename ra_assists -> assists 2020-08-13 17:33:38 +02:00
fix_visibility.rs Rename ra_assists -> assists 2020-08-13 17:33:38 +02:00
flip_binexpr.rs Rename ra_assists -> assists 2020-08-13 17:33:38 +02:00
flip_comma.rs Rename ra_assists -> assists 2020-08-13 17:33:38 +02:00
flip_trait_bound.rs Rename ra_assists -> assists 2020-08-13 17:33:38 +02:00
generate_derive.rs Rename ra_assists -> assists 2020-08-13 17:33:38 +02:00
generate_from_impl_for_enum.rs Rename ra_assists -> assists 2020-08-13 17:33:38 +02:00
generate_function.rs Rename ra_assists -> assists 2020-08-13 17:33:38 +02:00
generate_impl.rs Rename ra_assists -> assists 2020-08-13 17:33:38 +02:00
generate_new.rs Rename ra_assists -> assists 2020-08-13 17:33:38 +02:00
inline_local_variable.rs **Inline Variable** works with field shorthand 2020-08-26 13:03:14 +02:00
introduce_named_lifetime.rs Rename ra_assists -> assists 2020-08-13 17:33:38 +02:00
invert_if.rs Invert if should be smart about is_some, is_none, is_ok, is_err 2020-08-23 22:30:34 -06:00
merge_imports.rs Allow merge_imports assists to merge imports of equal visibility 2020-09-05 16:15:16 +02:00
merge_match_arms.rs Rename ra_assists -> assists 2020-08-13 17:33:38 +02:00
move_bounds.rs Rename ra_assists -> assists 2020-08-13 17:33:38 +02:00
move_guard.rs Rename ra_assists -> assists 2020-08-13 17:33:38 +02:00
raw_string.rs Rename ra_assists -> assists 2020-08-13 17:33:38 +02:00
remove_dbg.rs One more test 2020-09-11 00:20:13 +03:00
remove_mut.rs Rename ra_assists -> assists 2020-08-13 17:33:38 +02:00
remove_unused_param.rs **Remove Unused Parameter** refactoring 2020-08-19 19:40:55 +02:00
reorder_fields.rs Rename ra_assists -> assists 2020-08-13 17:33:38 +02:00
replace_if_let_with_match.rs Rename ra_assists -> assists 2020-08-13 17:33:38 +02:00
replace_impl_trait_with_generic.rs Remove unnecessary comma 2020-09-04 22:58:50 +03:00
replace_let_with_if_let.rs Rename ra_assists -> assists 2020-08-13 17:33:38 +02:00
replace_qualified_name_with_use.rs Fix import insertion breaking nested modules 2020-09-03 18:36:08 +02:00
replace_unwrap_with_match.rs ⬆️ ungrammar 2020-08-21 19:14:05 +02:00
split_import.rs Rename ra_assists -> assists 2020-08-13 17:33:38 +02:00
unwrap_block.rs Rename ra_assists -> assists 2020-08-13 17:33:38 +02:00