summaryrefslogtreecommitdiff
path: root/exercises/17_tests
diff options
context:
space:
mode:
authormo8it <mo8it@proton.me>2024-05-22 15:04:12 +0200
committermo8it <mo8it@proton.me>2024-05-22 15:04:12 +0200
commit3bb71c6b0c9d58e421f79d914f5483cb5a98af0b (patch)
tree3b28edae9903c24212be1aa54d5d0e7bd69bedfa /exercises/17_tests
parentd0b843d6c4a99636d3dc6caf3ceebea14cb3b07d (diff)
Remove unneeded pub
Diffstat (limited to 'exercises/17_tests')
-rw-r--r--exercises/17_tests/tests3.rs2
-rw-r--r--exercises/17_tests/tests4.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/exercises/17_tests/tests3.rs b/exercises/17_tests/tests3.rs
index 3b4e199..d1cb489 100644
--- a/exercises/17_tests/tests3.rs
+++ b/exercises/17_tests/tests3.rs
@@ -2,7 +2,7 @@
// the test passes. Then write a second test that tests whether we get the
// result we expect to get when we call `is_even(5)`.
-pub fn is_even(num: i32) -> bool {
+fn is_even(num: i32) -> bool {
num % 2 == 0
}
diff --git a/exercises/17_tests/tests4.rs b/exercises/17_tests/tests4.rs
index 35a9a3b..4303ed0 100644
--- a/exercises/17_tests/tests4.rs
+++ b/exercises/17_tests/tests4.rs
@@ -7,7 +7,7 @@ struct Rectangle {
impl Rectangle {
// Only change the test functions themselves
- pub fn new(width: i32, height: i32) -> Self {
+ fn new(width: i32, height: i32) -> Self {
if width <= 0 || height <= 0 {
panic!("Rectangle width and height cannot be negative!")
}