-
Notifications
You must be signed in to change notification settings - Fork 543
Remove the as_ref
check in RNA?
#76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I'm not sure (not familiar with Rust). @bitborn do you remember what this was about? |
In its initial form, it appears this test just wanted conversion to a string. Asking for that may be clearer than Of course there's the question of "what's the value in asking students to be able to convert their RNA to a string anyway?". That I'd want to take some time to survey this problem in other languages to understand why. I've not thought about this exercise before. |
FWIW, I'm familiar with the Elixir and Ruby version of this exercise and they don't have any tests like this. |
I'm not by any means an expert on best practices in Rust (which is only relevant if there's some Rust practices reason for keeping this test in), but my current thinking is to agree - the test on converting to a string is not really useful (it's not to do with the problem statement, there's no clear use case for converting the RNA to a string, other languages don't do it, and other tests in xrust don't do it). I'm in favor of removing it. |
This might be because I'm new to Rust, but I don't see the value of this test in the RNA transcription exercise. It doesn't seem germane to the problem, and the commit that introduced it doesn't really explain why it's there.
Its presence seems to require the solver to implement
AsRef
for their Struct (as shown in the example solution) just so that the test can be passed. Implementing AsRef doesn't add any other value, as far as I can see. All the other tests are passable without implementing AsRef.But, again, new to Rust here so I'm probably missing something. My solution, which passes all tests but the
as_ref
one is here: https://gist.github.com/IanWhitney/b2ac83ae8195f5fc1a75The text was updated successfully, but these errors were encountered: