Ad
  • Custom User Avatar

    Thanks, I'm really not very good at Rust as you can probably tell.

  • Custom User Avatar

    Seems like the more readable the code gets, the worse it performs.

    It's probably because of all the references and function calls.

  • Custom User Avatar

    Thanks for updating stale translations. I've approved a downstream fork.

    For future reference: unless the reference solution is wrong/buggy or not performant enough, there's no reason to change it with your own in a fork; when the translation is approved, the solution (with your changes!) will show up under the original author's name, not yours. I'm sure you'll understand why it's undesirable to publish code in someone else's name.

  • Custom User Avatar

    Yeah, probably. I remember wondering about that when I wrote it. Then the tests all came back green and I forgot about it and moved on.

  • Custom User Avatar

    Fixed, along with other improvements.

  • Custom User Avatar

    A bit of a nitpick, but fair enough: since this is a beginner kata, best to start teaching good habits. That said, there were other things wrong with this translation so I took the liberty to fix those too.

  • Custom User Avatar

    I prefer two spaces, but since Rust and the Codewars Rust editor appear to be rather strict about it, I changed it to four spaces.

  • Custom User Avatar

    Thank you, I think I fixed it now. The random tests import the HashMap themselves.