MCPcopy Create free account
hub / github.com/ahgamut/rust-ape-example / analyze_slice

Function analyze_slice

src/bin/primitives_array.rs:7–10  ·  view source on GitHub ↗

This function borrows a slice

(slice: &[i32])

Source from the content-addressed store, hash-verified

5
6// This function borrows a slice
7fn analyze_slice(slice: &[i32]) {
8 println!("first element of the slice: {}", slice[0]);
9 println!("the slice has {} elements", slice.len());
10}
11
12fn part0() {
13 // Fixed-size array (type signature is superfluous)

Callers 1

part0Function · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected