mirror of
https://github.com/rust-lang/rustlings.git
synced 2026-01-03 09:19:18 +00:00
Add missing return type
This commit is contained in:
parent
c7a18b0781
commit
53f805ce7a
@ -15,7 +15,7 @@ fn main() {
|
|||||||
println!("Your sale price is {}", sale_price(original_price));
|
println!("Your sale price is {}", sale_price(original_price));
|
||||||
}
|
}
|
||||||
|
|
||||||
fn sale_price(price: i32) -> {
|
fn sale_price(price: i32) -> i32 {
|
||||||
if is_even(price) {
|
if is_even(price) {
|
||||||
price - 10
|
price - 10
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user