I'm struggling to work out how to use the Result types you get back from functions that return results.
If i use "if let" the variable seems to be inside the scope of the if statement so cant be accessed after it ends.
Same with match
A lot of examples I see just use .unwrap() but then say don't use this in a real world app as it could crash if you get an error. So what is the correct way to deal with this ?