Convert A String Into An Integer In Rust
Using turbofish
value.
Output:
[_active_nvim_run:4:18] num = 1
Using Explicit Type Annotation
NOTE: .parse
returns a Result
which is just pulled with .unwrap
without any error handing in this example
Output:
[_active_nvim_run:4:3] num = 2
-- end of line --