Rust functions can return values. The last expression (without a semicolon) is the return value.
fn add(a: i32, b: i32) -> i32 { a + b // No semicolon means it's returned }
Use return explicitly if needed:
return
fn square(x: i32) -> i32 { return x * x; }