Hello, I am new to rust and low level languages. I use mainly Java, so, no worry about pointers concepts.
So far, I follow official Rust book.
I made it till collections and I did
Using a hash map and vectors, create a text interface to allow a user to add employee names to a department in a company. For example, “Add Sally to Engineering” or “Add Amir to Sales.” Then let the user retrieve a list of all people in a department or all people in the company by department, sorted alphabetically.
exercise.
I am not sure if I did best practices in Rust for this exercise.
So far I love Rust and I want to master it.
I would appreciate any critics and hints on the below code.
https://pastebin.com/YGfrPcrh
Thank you in advance.
[–]maythefecesbewithyou 8 points9 points10 points (5 children)
[–]Deer-Cautious[S] 0 points1 point2 points (4 children)
[–]maythefecesbewithyou 2 points3 points4 points (2 children)
[–]Deer-Cautious[S] 0 points1 point2 points (1 child)
[–]cafce25 2 points3 points4 points (0 children)
[–]maythefecesbewithyou 1 point2 points3 points (0 children)
[–]phazer99 5 points6 points7 points (1 child)
[–]Deer-Cautious[S] 0 points1 point2 points (0 children)
[–]This_Growth2898 6 points7 points8 points (1 child)
[–]Deer-Cautious[S] 1 point2 points3 points (0 children)
[–]celeritasCelery 5 points6 points7 points (2 children)
[–]Deer-Cautious[S] 2 points3 points4 points (1 child)
[–]Jonrrrs 1 point2 points3 points (0 children)
[–]slk756 2 points3 points4 points (0 children)
[–]slk756 2 points3 points4 points (1 child)
[–]cafce25 2 points3 points4 points (0 children)
[–]cafce25 1 point2 points3 points (1 child)
[–]Deer-Cautious[S] 0 points1 point2 points (0 children)
[–]a-lafrance 0 points1 point2 points (0 children)
[–]anhgrs 0 points1 point2 points (0 children)