mirror of
https://git.aramjonghu.dev/AramJonghu/rustlings.git
synced 2026-09-05 17:53:29 +02:00
Remove unneeded pub
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
@@ -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!")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user