MCPcopy Create free account
hub / github.com/argumentcomputer/ix / u64_to_usize

Function u64_to_usize

crates/kernel/src/error.rs:13–16  ·  view source on GitHub ↗
(val: u64)

Source from the content-addressed store, hash-verified

11/// the platform's pointer width (relevant for 32-bit targets).
12#[inline(always)]
13pub fn u64_to_usize<M: KernelMode>(val: u64) -> Result<usize, TcError<M>> {
14 usize::try_from(val)
15 .map_err(|_e| TcError::Other(format!("{val} exceeds usize::MAX")))
16}
17
18#[derive(Clone, Debug)]
19pub enum TcError<M: KernelMode> {

Callers 6

is_large_eliminatorMethod · 0.85
compute_k_targetMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected