MCPcopy Create free account
hub / github.com/SoftbearStudios/bitcode / mul_length

Function mul_length

src/consume.rs:47–51  ·  view source on GitHub ↗

Returns `Ok(length * x)` if it does not overflow.

(length: usize, x: usize)

Source from the content-addressed store, hash-verified

45
46/// Returns `Ok(length * x)` if it does not overflow.
47pub fn mul_length(length: usize, x: usize) -> Result<usize> {
48 length
49 .checked_mul(x)
50 .ok_or_else(|| error("length overflow"))
51}

Callers 1

populateMethod · 0.85

Calls 1

errorFunction · 0.70

Tested by

no test coverage detected