mirror of
https://github.com/compiler-explorer/compiler-explorer.git
synced 2025-12-27 12:54:00 -05: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()
|
|
}
|