Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
_nalply
on March 11, 2024
|
parent
|
context
|
favorite
| on:
Why does Rust choose not to provide `for` comprehe...
Or declare the type of bool_arr.
kibwen
on March 11, 2024
[–]
Indeed, in which case it looks much cleaner than specifying the length via the turbofish:
let bool_arr: [bool; 5] = ...
crznp
on March 11, 2024
|
parent
[–]
That's true. As a relative novice to Rust, I'm familiar with array types, but I'd need to look up `from_fn`
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: