@@ -15,7 +15,7 @@ use cmp;
15
15
use hash:: { Hash , Hasher } ;
16
16
use iter:: { Iterator , ExactSizeIterator } ;
17
17
use marker:: { Copy , Send , Sync , Sized , self } ;
18
- use mem:: { min_align_of , size_of} ;
18
+ use mem:: { align_of , size_of} ;
19
19
use mem;
20
20
use num:: wrapping:: OverflowingOps ;
21
21
use ops:: { Deref , DerefMut , Drop } ;
@@ -553,9 +553,9 @@ fn calculate_allocation(hash_size: usize, hash_align: usize,
553
553
vals_align) ;
554
554
let ( end_of_vals, oflo2) = vals_offset. overflowing_add ( vals_size) ;
555
555
556
- let min_align = cmp:: max ( hash_align, cmp:: max ( keys_align, vals_align) ) ;
556
+ let align = cmp:: max ( hash_align, cmp:: max ( keys_align, vals_align) ) ;
557
557
558
- ( min_align , hash_offset, end_of_vals, oflo || oflo2)
558
+ ( align , hash_offset, end_of_vals, oflo || oflo2)
559
559
}
560
560
561
561
#[ test]
@@ -597,9 +597,9 @@ impl<K, V> RawTable<K, V> {
597
597
// factored out into a different function.
598
598
let ( malloc_alignment, hash_offset, size, oflo) =
599
599
calculate_allocation (
600
- hashes_size, min_align_of :: < u64 > ( ) ,
601
- keys_size, min_align_of :: < K > ( ) ,
602
- vals_size, min_align_of :: < V > ( ) ) ;
600
+ hashes_size, align_of :: < u64 > ( ) ,
601
+ keys_size, align_of :: < K > ( ) ,
602
+ vals_size, align_of :: < V > ( ) ) ;
603
603
604
604
assert ! ( !oflo, "capacity overflow" ) ;
605
605
@@ -630,8 +630,8 @@ impl<K, V> RawTable<K, V> {
630
630
let buffer = * self . hashes as * mut u8 ;
631
631
let ( keys_offset, vals_offset, oflo) =
632
632
calculate_offsets ( hashes_size,
633
- keys_size, min_align_of :: < K > ( ) ,
634
- min_align_of :: < V > ( ) ) ;
633
+ keys_size, align_of :: < K > ( ) ,
634
+ align_of :: < V > ( ) ) ;
635
635
debug_assert ! ( !oflo, "capacity overflow" ) ;
636
636
unsafe {
637
637
RawBucket {
@@ -1005,9 +1005,9 @@ impl<K, V> Drop for RawTable<K, V> {
1005
1005
let keys_size = self . capacity * size_of :: < K > ( ) ;
1006
1006
let vals_size = self . capacity * size_of :: < V > ( ) ;
1007
1007
let ( align, _, size, oflo) =
1008
- calculate_allocation ( hashes_size, min_align_of :: < u64 > ( ) ,
1009
- keys_size, min_align_of :: < K > ( ) ,
1010
- vals_size, min_align_of :: < V > ( ) ) ;
1008
+ calculate_allocation ( hashes_size, align_of :: < u64 > ( ) ,
1009
+ keys_size, align_of :: < K > ( ) ,
1010
+ vals_size, align_of :: < V > ( ) ) ;
1011
1011
1012
1012
debug_assert ! ( !oflo, "should be impossible" ) ;
1013
1013
0 commit comments