diff options
Diffstat (limited to 'crates/ra_assists')
-rw-r--r-- | crates/ra_assists/src/utils.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_assists/src/utils.rs b/crates/ra_assists/src/utils.rs index 2f15a3f15..f3fc92ebf 100644 --- a/crates/ra_assists/src/utils.rs +++ b/crates/ra_assists/src/utils.rs | |||
@@ -103,7 +103,7 @@ fn invert_special_case(expr: &ast::Expr) -> Option<ast::Expr> { | |||
103 | } | 103 | } |
104 | 104 | ||
105 | #[derive(Clone, Copy)] | 105 | #[derive(Clone, Copy)] |
106 | pub(crate) enum TryEnum { | 106 | pub enum TryEnum { |
107 | Result, | 107 | Result, |
108 | Option, | 108 | Option, |
109 | } | 109 | } |
@@ -111,7 +111,7 @@ pub(crate) enum TryEnum { | |||
111 | impl TryEnum { | 111 | impl TryEnum { |
112 | const ALL: [TryEnum; 2] = [TryEnum::Option, TryEnum::Result]; | 112 | const ALL: [TryEnum; 2] = [TryEnum::Option, TryEnum::Result]; |
113 | 113 | ||
114 | pub(crate) fn from_ty(sema: &Semantics<RootDatabase>, ty: &Type) -> Option<TryEnum> { | 114 | pub fn from_ty(sema: &Semantics<RootDatabase>, ty: &Type) -> Option<TryEnum> { |
115 | let enum_ = match ty.as_adt() { | 115 | let enum_ = match ty.as_adt() { |
116 | Some(Adt::Enum(it)) => it, | 116 | Some(Adt::Enum(it)) => it, |
117 | _ => return None, | 117 | _ => return None, |