diff options
| author | mo8it <mo8it@proton.me> | 2024-05-22 15:04:12 +0200 |
|---|---|---|
| committer | mo8it <mo8it@proton.me> | 2024-05-22 15:04:12 +0200 |
| commit | 3bb71c6b0c9d58e421f79d914f5483cb5a98af0b (patch) | |
| tree | 3b28edae9903c24212be1aa54d5d0e7bd69bedfa /exercises/13_error_handling | |
| parent | d0b843d6c4a99636d3dc6caf3ceebea14cb3b07d (diff) | |
Remove unneeded pub
Diffstat (limited to 'exercises/13_error_handling')
| -rw-r--r-- | exercises/13_error_handling/errors1.rs | 2 | ||||
| -rw-r--r-- | exercises/13_error_handling/errors2.rs | 2 | ||||
| -rw-r--r-- | exercises/13_error_handling/errors3.rs | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/exercises/13_error_handling/errors1.rs b/exercises/13_error_handling/errors1.rs index 15a3716..e3e0482 100644 --- a/exercises/13_error_handling/errors1.rs +++ b/exercises/13_error_handling/errors1.rs @@ -8,7 +8,7 @@ fn main() { // You can optionally experiment here. } -pub fn generate_nametag_text(name: String) -> Option<String> { +fn generate_nametag_text(name: String) -> Option<String> { if name.is_empty() { // Empty names aren't allowed. None diff --git a/exercises/13_error_handling/errors2.rs b/exercises/13_error_handling/errors2.rs index e39aa95..345a0ee 100644 --- a/exercises/13_error_handling/errors2.rs +++ b/exercises/13_error_handling/errors2.rs @@ -16,7 +16,7 @@ use std::num::ParseIntError; -pub fn total_cost(item_quantity: &str) -> Result<i32, ParseIntError> { +fn total_cost(item_quantity: &str) -> Result<i32, ParseIntError> { let processing_fee = 1; let cost_per_item = 5; let qty = item_quantity.parse::<i32>(); diff --git a/exercises/13_error_handling/errors3.rs b/exercises/13_error_handling/errors3.rs index 5661f17..2ef84f9 100644 --- a/exercises/13_error_handling/errors3.rs +++ b/exercises/13_error_handling/errors3.rs @@ -18,7 +18,7 @@ fn main() { } } -pub fn total_cost(item_quantity: &str) -> Result<i32, ParseIntError> { +fn total_cost(item_quantity: &str) -> Result<i32, ParseIntError> { let processing_fee = 1; let cost_per_item = 5; let qty = item_quantity.parse::<i32>()?; |
