rust-practice / cargo-leet

Program to make working on leetcode problems locally more convenient
Apache License 2.0
5 stars 3 forks source link

Failed to detect input as output #83

Open c-git opened 6 months ago

c-git commented 6 months ago

Leetcode problem

  1. Sort Colors

https://leetcode.com/problems/sort-colors/

Error Message

Unknown type ""

Initial thoughts about problem

This question uses a mutable input as the way to check your solution. Not sure why the type wasn't detected but I'd imagine it is related to the regex not matching it well.

c-git commented 6 months ago

After solving the problem I've realize I had to change the template generated to work with rstest. A separate issue is this problem is best suited to a custom validator instead of matching a specific input. Here is the link to how I handled the testing for this problem (well and the solution).