diff options
author | Laurențiu Nicola <[email protected]> | 2021-03-25 19:03:20 +0000 |
---|---|---|
committer | Laurențiu Nicola <[email protected]> | 2021-03-25 19:03:20 +0000 |
commit | 9787bddac577a6aa24388fb91286474a7a8cf0bc (patch) | |
tree | 2549ec113b23c88ac95fe4eee2e59f8e95297465 /crates/hir_ty/src/display.rs | |
parent | 59fdd7c84c5fdc16573f3cca4081d6735eaa9208 (diff) |
Use arrayvec 0.6
Diffstat (limited to 'crates/hir_ty/src/display.rs')
-rw-r--r-- | crates/hir_ty/src/display.rs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/crates/hir_ty/src/display.rs b/crates/hir_ty/src/display.rs index 6149067c7..51480304b 100644 --- a/crates/hir_ty/src/display.rs +++ b/crates/hir_ty/src/display.rs | |||
@@ -1,8 +1,7 @@ | |||
1 | //! FIXME: write short doc here | 1 | //! FIXME: write short doc here |
2 | 2 | ||
3 | use std::fmt; | 3 | use std::{array, fmt}; |
4 | 4 | ||
5 | use arrayvec::ArrayVec; | ||
6 | use chalk_ir::Mutability; | 5 | use chalk_ir::Mutability; |
7 | use hir_def::{ | 6 | use hir_def::{ |
8 | db::DefDatabase, | 7 | db::DefDatabase, |
@@ -669,8 +668,7 @@ fn fn_traits(db: &dyn DefDatabase, trait_: TraitId) -> impl Iterator<Item = Trai | |||
669 | db.lang_item(krate, "fn_mut".into()), | 668 | db.lang_item(krate, "fn_mut".into()), |
670 | db.lang_item(krate, "fn_once".into()), | 669 | db.lang_item(krate, "fn_once".into()), |
671 | ]; | 670 | ]; |
672 | // FIXME: Replace ArrayVec when into_iter is a thing on arrays | 671 | array::IntoIter::new(fn_traits).into_iter().flatten().flat_map(|it| it.as_trait()) |
673 | ArrayVec::from(fn_traits).into_iter().flatten().flat_map(|it| it.as_trait()) | ||
674 | } | 672 | } |
675 | 673 | ||
676 | pub fn write_bounds_like_dyn_trait_with_prefix( | 674 | pub fn write_bounds_like_dyn_trait_with_prefix( |