Skip to content

Commit 80cc2a5

Browse files
nathanielknightcoriolinus
authored andcommitted
prime-factors: Add solution template (#440)
* Add solution template for prime-factors * Use the template function's parameter This way, the learner doesn't hit `unused variable` warnings when they first compile the example.
1 parent 6615150 commit 80cc2a5

File tree

1 file changed

+3
-0
lines changed
  • exercises/prime-factors/src

1 file changed

+3
-0
lines changed

exercises/prime-factors/src/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
pub fn factors(n: u32) -> Vec<u32> {
2+
unimplemented!("This should calculate the prime factors of {}", n)
3+
}

0 commit comments

Comments
 (0)