diff options
author | Florian Diebold <[email protected]> | 2020-02-22 12:15:54 +0000 |
---|---|---|
committer | Florian Diebold <[email protected]> | 2020-02-22 12:15:54 +0000 |
commit | 5a6e770f99d1549432c1e8a1abb1aada09ad2590 (patch) | |
tree | 32e6786083303dd0518f369362673528b81cd314 /crates | |
parent | 3e106c77ff76c39be49444165eac805d32666e41 (diff) |
Shorten some code
Diffstat (limited to 'crates')
-rw-r--r-- | crates/ra_hir_ty/src/traits/builtin.rs | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/crates/ra_hir_ty/src/traits/builtin.rs b/crates/ra_hir_ty/src/traits/builtin.rs index df0645717..cc0f3eeb4 100644 --- a/crates/ra_hir_ty/src/traits/builtin.rs +++ b/crates/ra_hir_ty/src/traits/builtin.rs | |||
@@ -230,10 +230,7 @@ fn check_unsize_impl_prerequisites(db: &impl HirDatabase, krate: CrateId) -> boo | |||
230 | None => return false, | 230 | None => return false, |
231 | }; | 231 | }; |
232 | let generic_params = generics(db, unsize_trait.into()); | 232 | let generic_params = generics(db, unsize_trait.into()); |
233 | if generic_params.len() != 2 { | 233 | generic_params.len() == 2 |
234 | return false; | ||
235 | } | ||
236 | true | ||
237 | } | 234 | } |
238 | 235 | ||
239 | fn array_unsize_impl_datum(db: &impl HirDatabase, krate: CrateId) -> BuiltinImplData { | 236 | fn array_unsize_impl_datum(db: &impl HirDatabase, krate: CrateId) -> BuiltinImplData { |