mirror of
https://github.com/compiler-explorer/compiler-explorer.git
synced 2026-05-16 14:53:04 -04:00
This commit - formats the Rust examples idiomatically - uses idiomatic code - uses only safe code without compromising on performance - makes them compile on stable
4 lines
66 B
Rust
4 lines
66 B
Rust
pub fn sum_array(input: &[i32]) -> i32 {
|
|
input.iter().sum()
|
|
}
|