/// Creates a non-packed layout for a given size, trying to use the maximum
/// alignment possible.
Creates a non-packed layout for a given size, trying to use the maximum
alignment possible.
Creates a non - packed layout for a given size trying to use the maximum alignment possible .
pub fn for_size(size: usize) -> Self {
        let mut next_align = 2;
        while size % next_align == 0 &&
            next_align <= mem::size_of::<*mut ()>()
        {
            next_align *= 2;
        }
        Layout {
            size: size,
            align: next_align / 2,
            packed: false,
        }
    }
pub fn for_size ( size : usize ) -> Self { let mut next_align = 2 ; while size % next_align == 0 && next_align <= mem :: size_of :: < * mut ( ) > ( ) { next_align *= 2 ; } Layout { size : size , align : next_align / 2 , packed : false , } }
Creates a non-packed layout for a given size, trying to use the maximum
alignment possible.
Creates a non - packed layout for a given size trying to use the maximum alignment possible .
size
usize