Without checking, at opt-level=3, which of these will optimize away the unwrap
, as max will always return Some when used with a non-zero-length array?
pub fn fna(x: [u8; 1024]) -> u8 { x.into_iter().max().unwrap() } pub fn fnb(x: [u8; 1024]) -> u8 { *x.iter().max().unwrap() }
[#]rust #rustlang
=> More informations about this toot | More toots from seri@hachyderm.io
text/gemini
This content has been proxied by September (ba2dc).