3 ms·
That function looks like this in Rust: https://doc.rust-lang.org/std/ops/trait.Index.html https://doc.rust-lang.org/std/ops/trait.Index.html (it's heavily gener
by steveklabnik 10y ago
That function looks like this in Rust: https://doc.rust-lang.org/std/ops/trait.Index.html https://doc.rust-lang.org/std/ops/trait.Index.html (it's heavily generic, it could be slightly less verbose if it didn't have to handle Sized)
The compiler will errr if x isn't indexable, or if it is but not by the type of a, in terms of your function's names.