Return ceil(x / y).
(x: usize, y: usize)
| 40 | |
| 41 | /// Return ceil(x / y). |
| 42 | pub(crate) fn ceil_div(x: usize, y: usize) -> usize { |
| 43 | // XXX. warning: this expression can overflow. |
| 44 | (x + y - 1) / y |
| 45 | } |
| 46 | |
| 47 | #[derive(Derivative, CanonicalSerialize, CanonicalDeserialize)] |
| 48 | #[derivative(Default(bound = ""), Clone(bound = ""), Debug(bound = ""))] |
no outgoing calls
no test coverage detected