remove debug_assert in padding_needed_for

This commit is contained in:
gnzlbg 2018-06-02 16:03:33 +02:00
parent 6c3ebcd223
commit 6ff67ee0d7

View File

@ -204,9 +204,6 @@ impl Layout {
/// satisfy this constraint is to ensure `align <= self.align()`.
#[inline]
pub fn padding_needed_for(&self, align: usize) -> usize {
// **FIXME**: This function is only called with proper power-of-two
// alignments. Maybe we should turn this into a real assert!.
debug_assert!(align.is_power_of_two());
let len = self.size();
// Rounded up value is: