Ad
  • Custom User Avatar

    It's unfortunate that the inputs are stringified. Rust has such a nice, rich type system, why not use it? Resources are a perfect fit for enums, with variants being tuples with their respective counts for example.

    The idea is good, but it could be even spicier if there wasn't simply a 1:1 trading ratio per resource.

    That said, my only real "issue" with the kata is that the tests don't have proper assertion messages. Rust's test framework is designed with the assumption that the code author can see tests and thus knows what "right" and "left" refer to. On codewars, this isn't the case, and it needs to be clarified.