From 1fee60181fea56ebe6b5e4aeb11cf9df25a1d087 Mon Sep 17 00:00:00 2001 From: Matthew Hall Date: Wed, 1 Apr 2020 22:26:41 +0100 Subject: Add impl From for enum variant assist Basically adds a From impl for tuple enum variants with one field. Added to cover the fairly common case of implementing your own Error that can be created from another one, although other use cases exist. --- crates/ra_assists/src/lib.rs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'crates/ra_assists/src/lib.rs') diff --git a/crates/ra_assists/src/lib.rs b/crates/ra_assists/src/lib.rs index fa1f3dd26..6b4c56dcd 100644 --- a/crates/ra_assists/src/lib.rs +++ b/crates/ra_assists/src/lib.rs @@ -122,6 +122,7 @@ mod handlers { mod replace_qualified_name_with_use; mod replace_unwrap_with_match; mod split_import; + mod add_from_impl_for_enum; pub(crate) fn all() -> &'static [AssistHandler] { &[ @@ -159,6 +160,7 @@ mod handlers { replace_qualified_name_with_use::replace_qualified_name_with_use, replace_unwrap_with_match::replace_unwrap_with_match, split_import::split_import, + add_from_impl_for_enum::add_from_impl_for_enum, ] } } -- cgit v1.2.3