prime-factors: Add solution template#440
Conversation
coriolinus
left a comment
There was a problem hiding this comment.
Hi @neganp, thanks for this PR! It generally looks good, but I'd like you to make the change shown below so that there are no compile warnings when the student first downloads the exercise.
| @@ -0,0 +1,3 @@ | |||
| pub fn factors(n: u32) -> Vec<u32> { | |||
| unimplemented!() | |||
There was a problem hiding this comment.
Please update to reference n so that there is no unused variable warning, like this.
There was a problem hiding this comment.
Oh nice! I didn't know you could do that. 👍
This way, the learner doesn't hit `unused variable` warnings when they first compile the example.
coriolinus
left a comment
There was a problem hiding this comment.
Looks good, thanks!
I'm going to let this sit for a few days now so other maintainers have a chance to take a look and make their comments, but unless blocking changes are discovered, I intend to merge this on 5 Mar.
|
Cool, thanks! 🙂 |
petertseng
left a comment
There was a problem hiding this comment.
Yes.
I recommend squash when merging.
You have reminded me (or this PR caused me to remind myself, whichever wording you think is better) that in #269 we decided that all exercises should have stubs that allow running the tests, got it.
|
@neganp Have you reviewed your code? The test uses a big number which does not fit into rust/exercises/prime-factors/tests/prime-factors.rs Lines 42 to 44 in 80d2988 |
|
Oh, good catch. Weird that it passed all my tests 😕 It looks like a |
|
Wait, this doesn't even pass my tests; how embarrassing 😧 . |
|
This raises the question: why didn't Travis catch this?
…On Wed, Mar 14, 2018, 17:52 Nathaniel Knight ***@***.***> wrote:
Wait, this doesn't even pass my tests; how embarrassing 😧 .
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#440 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AHdeTn5GVw1-1ND0N1thd7zykJtowT4Wks5teUrJgaJpZM4SVr-d>
.
|
|
I looks like some of the tests don't run on at least some of the builds: https://travis-ci.org/exercism/rust/jobs/347483074#L2213 |
|
I think that's a bug which we should fix. |
No description provided.