fix: ✏️ typos and compiler warnings

This commit is contained in:
Ahmet Kaan GÜMÜŞ 2024-06-17 18:19:36 +03:00
parent 82c2fb8883
commit 528969944d
17 changed files with 578 additions and 632 deletions

View file

@ -1,26 +1,22 @@
fn main()
{
hello();
fn main() {
hello();
let x = {
let y = 5; //Statement
y+0 //Expression
};
println!("X = {}", x);
let x = {
let y = 5; //Statement
y + 0 //Expression
};
println!("X = {}", x);
let y = return_value(x);
println!("Y = {}", y)
}
let y = return_value(x);
println!("Y = {}", y)
}
fn hello() {
println!("Hello World");
}
fn hello()
{
println!("Hello World");
}
fn return_value(mut x:i32) -> i32
{
println!("We're going to return something");
x = x+1;
x*x
}
fn return_value(mut x: i32) -> i32 {
println!("We're going to return something");
x = x + 1;
x * x
}