MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / round_up

Function round_up

nodedb/src/data/io/aligned_buf.rs:91–93  ·  view source on GitHub ↗
(value: usize, align: usize)

Source from the content-addressed store, hash-verified

89/// Round `value` up to the next multiple of `align` (power of two).
90#[inline]
91pub(super) const fn round_up(value: usize, align: usize) -> usize {
92 (value + align - 1) & !(align - 1)
93}
94
95#[cfg(test)]
96mod tests {

Callers 2

newMethod · 0.70
round_up_readFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected