Hello
I've been interested with Rust for the last year, but cannot find time to learn Rust.
Coming from Python, i have found my self quite difficult to learn Rust and grasp its concepts.
So, for the last couple of weeks, i have been able to spare some times to learn Rust, and created a mini project to parse Vendor OUI with Rust.
If you would be so kind to spare some of your time to review my code and give me some constructive feedback on how to tackle this, and some guidance for me about what i can improve because its not the rust way of doing things, i would be very happy. I want to improve my skills on Rust so i have another tools in my toolbox
This is not a promotion, because i believe there's another tools just like mine out there nor i want you to use my project, because this project is only for me to test my skill for using Rust.
Thank you in advanced :D
=== Additional text after posting ===
Thank you for those who reply, i really learned something new. I'll try to improve my code :D
Shout Out to Nous, Hades, Kwdg, BB_C
<3
I just scrolled through it, so no deep insights, but at first glance it looks pretty good.
One thing I saw, and that probably every rust programmer has to learn in the beginning, is to use slices for function parameters whenever prossible. Pretty much every time you use
fn foo(s: &String)you should usefn foo(s: &str)and the same goes for&Vec<T>->&[T]. Calling these works still the same so just changing the function definitions should work.The advantage of this is, that now you can use every type that can be dereferenced as the slice, so you can now call foo like this
foo("bar");or with aStringfoo(&String::from("bar"));. The same applies for&[T]which can be called with&Vec<T>or an array&[T; N]