MCPcopy Create free account
hub / github.com/PLSysSec/wave / vec_checked_lookup

Function vec_checked_lookup

src/tcb/misc.rs:16–21  ·  view source on GitHub ↗
(
    vec: &Vec<RuntimeResult<HostFd>>,
    index: SboxFd,
)

Source from the content-addressed store, hash-verified

14#[pure]
15#[requires(index < MAX_SBOX_FDS )]
16pub fn vec_checked_lookup(
17 vec: &Vec<RuntimeResult<HostFd>>,
18 index: SboxFd,
19) -> RuntimeResult<HostFd> {
20 vec[index as usize]
21}
22
23// Once again, Prusti does not accept that this is pure
24#[trusted]

Callers 3

check_vec_checked_lookupFunction · 0.85
lookupMethod · 0.85
fd_to_nativeMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected