@@ -97,7 +97,7 @@ mod tests;
9797pub struct VecDeque <
9898 T ,
9999 #[ unstable( feature = "allocator_api" , issue = "32838" ) ] A : Allocator = Global ,
100- const COOP_PREFERRED : bool = { DEFAULT_COOP_PREFERRED ! ( ) } ,
100+ const COOP_PREFERRED : bool = { DEFAULT_COOP_PREFERRED ! ( ) } ,
101101> where
102102 [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference :: < A > ( COOP_PREFERRED ) ] : ,
103103{
@@ -570,7 +570,8 @@ where
570570 #[ rustc_const_stable( feature = "const_vec_deque_new" , since = "CURRENT_RUSTC_VERSION" ) ]
571571 #[ must_use]
572572 pub const fn new ( ) -> VecDeque < T , Global , COOP_PREFERRED >
573- where [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference :: < Global > ( COOP_PREFERRED ) ] : ,
573+ where
574+ [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference :: < Global > ( COOP_PREFERRED ) ] : ,
574575 {
575576 // FIXME: This should just be `VecDeque::new_in(Global)` once that hits stable.
576577 VecDeque { head : 0 , len : 0 , buf : RawVec :: NEW }
@@ -2903,13 +2904,11 @@ where
29032904}
29042905
29052906#[ stable( feature = "vecdeque_vec_conversions" , since = "1.10.0" ) ]
2906- impl < T , A : Allocator , const COOP_PREFERRED : bool , const OTHER_COOP_PREFERRED : bool > From < Vec < T , A , OTHER_COOP_PREFERRED > >
2907- for VecDeque < T , A , COOP_PREFERRED >
2907+ impl < T , A : Allocator , const COOP_PREFERRED : bool , const OTHER_COOP_PREFERRED : bool >
2908+ From < Vec < T , A , OTHER_COOP_PREFERRED > > for VecDeque < T , A , COOP_PREFERRED >
29082909where
29092910 [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference :: < A > ( COOP_PREFERRED ) ] : ,
2910- [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference :: < A > (
2911- OTHER_COOP_PREFERRED ,
2912- ) ] : ,
2911+ [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference :: < A > ( OTHER_COOP_PREFERRED ) ] : ,
29132912{
29142913 /// Turn a [`Vec<T>`] into a [`VecDeque<T>`].
29152914 ///
@@ -2920,16 +2919,19 @@ where
29202919 /// and to not re-allocate the `Vec`'s buffer or allocate
29212920 /// any additional memory.
29222921 #[ inline]
2923- fn from ( other : Vec < T , A , OTHER_COOP_PREFERRED > ) -> Self
2924- {
2922+ fn from ( other : Vec < T , A , OTHER_COOP_PREFERRED > ) -> Self {
29252923 let ( ptr, len, cap, alloc) = other. into_raw_parts_with_alloc ( ) ;
2926- Self { head : 0 , len, buf : unsafe { RawVec :: < T , A , COOP_PREFERRED > :: from_raw_parts_in ( ptr, cap, alloc) } }
2924+ Self {
2925+ head : 0 ,
2926+ len,
2927+ buf : unsafe { RawVec :: < T , A , COOP_PREFERRED > :: from_raw_parts_in ( ptr, cap, alloc) } ,
2928+ }
29272929 }
29282930}
29292931
29302932#[ stable( feature = "vecdeque_vec_conversions" , since = "1.10.0" ) ]
2931- impl < T , A : Allocator , const COOP_PREFERRED : bool , const VECDEQUE_COOP_PREFERRED : bool > From < VecDeque < T , A , VECDEQUE_COOP_PREFERRED > >
2932- for Vec < T , A , COOP_PREFERRED >
2933+ impl < T , A : Allocator , const COOP_PREFERRED : bool , const VECDEQUE_COOP_PREFERRED : bool >
2934+ From < VecDeque < T , A , VECDEQUE_COOP_PREFERRED > > for Vec < T , A , COOP_PREFERRED >
29332935where
29342936 [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference :: < A > ( COOP_PREFERRED ) ] : ,
29352937 [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference :: < A > ( VECDEQUE_COOP_PREFERRED ) ] : ,
@@ -2963,11 +2965,9 @@ where
29632965 /// assert_eq!(vec, [8, 9, 1, 2, 3, 4]);
29642966 /// assert_eq!(vec.as_ptr(), ptr);
29652967 /// ```
2966- fn from (
2967- mut other : VecDeque < T , A , VECDEQUE_COOP_PREFERRED > ,
2968- ) -> Self
2968+ fn from ( mut other : VecDeque < T , A , VECDEQUE_COOP_PREFERRED > ) -> Self
29692969 where
2970- [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference :: < A > ( VECDEQUE_COOP_PREFERRED ) ] : ,
2970+ [ ( ) ; alloc:: co_alloc_metadata_num_slots_with_preference :: < A > ( VECDEQUE_COOP_PREFERRED ) ] : ,
29712971 {
29722972 other. make_contiguous ( ) ;
29732973
0 commit comments