Y
Hacker News
new
|
ask
|
show
|
jobs
by
_nalply
834 days ago
Or declare the type of bool_arr.
1 comments
kibwen
834 days ago
Indeed, in which case it looks much cleaner than specifying the length via the turbofish:
let bool_arr: [bool; 5] = ...
link
crznp
834 days ago
That's true. As a relative novice to Rust, I'm familiar with array types, but I'd need to look up `from_fn`
link