message-dispatch 0.1.3

message-dispatch
1
2
3
4
5
6
7
8
9
10
// This file is part of message-dispatch. It is subject to the license terms in the COPYRIGHT file found in the top-level directory of this distribution and at https://raw.githubusercontent.com/lemonrock/message-dispatch/master/COPYRIGHT. No part of message-dispatch, including this file, may be copied, modified, propagated, or distributed except according to the terms contained in the COPYRIGHT file.
// Copyright © 2019 The developers of message-dispatch. See the COPYRIGHT file in the top-level directory of this distribution and at https://raw.githubusercontent.com/lemonrock/message-dispatch/master/COPYRIGHT.


#[inline(always)]
const fn round_up_to_alignment<AlignTo>(pointer: usize) -> usize
{
	let alignment = align_of::<AlignTo>();
	((pointer + alignment - 1) / alignment) * alignment
}