book
book copied to clipboard
doc: added another solution to ch03-03: functions
Just added another way to fix the last code sample from https://doc.rust-lang.org/book/ch03-03-how-functions-work.html
fn main() {
let x = plus_one(5);
println!("The value of x is: {x}");
}
fn plus_one(x: i32) -> i32 {
x + 1;
}