@@ -1182,20 +1182,20 @@ impl<T, A: AllocRef + Clone> RawTable<T, A> {
1182
1182
pub unsafe fn into_iter_from ( self , iter : RawIter < T > ) -> RawIntoIter < T , A > {
1183
1183
debug_assert_eq ! ( iter. len( ) , self . len( ) ) ;
1184
1184
1185
- let allocator = self . alloc . clone ( ) ;
1186
- let alloc = self . into_alloc ( ) ;
1185
+ let alloc = self . alloc . clone ( ) ;
1186
+ let allocation = self . into_allocation ( ) ;
1187
1187
RawIntoIter {
1188
1188
iter,
1189
- alloc ,
1189
+ allocation ,
1190
1190
marker : PhantomData ,
1191
- allocator ,
1191
+ alloc ,
1192
1192
}
1193
1193
}
1194
1194
1195
1195
/// Converts the table into a raw allocation. The contents of the table
1196
1196
/// should be dropped using a `RawIter` before freeing the allocation.
1197
1197
#[ cfg_attr( feature = "inline-more" , inline) ]
1198
- pub ( crate ) fn into_alloc ( self ) -> Option < ( NonNull < u8 > , Layout ) > {
1198
+ pub ( crate ) fn into_allocation ( self ) -> Option < ( NonNull < u8 > , Layout ) > {
1199
1199
let alloc = if self . is_empty_singleton ( ) {
1200
1200
None
1201
1201
} else {
@@ -1765,9 +1765,9 @@ impl<T> FusedIterator for RawIter<T> {}
1765
1765
/// Iterator which consumes a table and returns elements.
1766
1766
pub struct RawIntoIter < T , A : AllocRef + Clone > {
1767
1767
iter : RawIter < T > ,
1768
- alloc : Option < ( NonNull < u8 > , Layout ) > ,
1768
+ allocation : Option < ( NonNull < u8 > , Layout ) > ,
1769
1769
marker : PhantomData < T > ,
1770
- allocator : A ,
1770
+ alloc : A ,
1771
1771
}
1772
1772
1773
1773
impl < T , A : AllocRef + Clone > RawIntoIter < T , A > {
@@ -1793,8 +1793,8 @@ unsafe impl<#[may_dangle] T, A: AllocRef + Clone> Drop for RawIntoIter<T, A> {
1793
1793
}
1794
1794
1795
1795
// Free the table
1796
- if let Some ( ( ptr, layout) ) = self . alloc {
1797
- self . allocator . dealloc ( ptr, layout) ;
1796
+ if let Some ( ( ptr, layout) ) = self . allocation {
1797
+ self . alloc . dealloc ( ptr, layout) ;
1798
1798
}
1799
1799
}
1800
1800
}
@@ -1812,8 +1812,8 @@ impl<T, A: AllocRef + Clone> Drop for RawIntoIter<T, A> {
1812
1812
}
1813
1813
1814
1814
// Free the table
1815
- if let Some ( ( ptr, layout) ) = self . alloc {
1816
- self . allocator
1815
+ if let Some ( ( ptr, layout) ) = self . allocation {
1816
+ self . alloc
1817
1817
. dealloc ( NonNull :: new_unchecked ( ptr. as_ptr ( ) ) , layout) ;
1818
1818
}
1819
1819
}
0 commit comments