[SOLVED] Newbie question


#1

Hi, I am trying to learn Rust and I having problems parsing a string. Could anyone explain to me how to make this work?
https://is.gd/QzJxNG

I understand I need to satisfy the trait but I havent been able to make it work… Thank you!


#2

If you’re writing your own parse function, no need for the FromStr stuff: https://is.gd/NR5WXJ

That said, since we have parse(), I would write this code more like this: https://is.gd/V8czUy

Does that make sense?


#3

Yeah that makes sense, solved it now, Thank you for the help!