Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Thanks. Sorry, I think this one was just my inattentiveness.
The function signature of the starter code shows that it expects
Option<(u64, u32)>
. To keep the description clean and easily maintainable, a lot of language-specific features are either inferred from the description or gleaned from the starter code or sample tests. All languages share the same description, the only way around it is to have a very long description that specifies everything for every language or to use a somewhat clunky method of showing different text blocks for different languages, which is a headache for kata authors to maintain. In this case, I think the function signature should be enough to let you know what you're supposed to return.Rust: Clarify Output Type of Function
The Rust version of this kata does not specify that the output should be an
Option<(u64, u32)>
, and this causes a few cryptic error messages from the compiler in random testing depending on the output variant. When anOption<(u64, u64)>
is used, there is an error regarding the use of.pow()
on au64
, but no indication that this is related to the kata.Almost did the same thing...but I changed the trait bounds on
array_diff
to also require thatT
implement theCopy
trait.Then I used
iter
andcopied
instead of just usinginto_iter
like I should have...because I initially misspelledinto_iter
while trying this exact thing :P