Skip to main content
Code Review

Return to Question

Commonmark migration
Source Link

Ch.8 Challenge:

Using a hash map and vectors, create a text interface to allow a user to add employee names to a department in the 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.

Ch.8 Challenge:

Using a hash map and vectors, create a text interface to allow a user to add employee names to a department in the 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.

Ch.8 Challenge:

Using a hash map and vectors, create a text interface to allow a user to add employee names to a department in the 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.

[Edit removed during grace period]
Source Link
Tweeted twitter.com/StackCodeReview/status/992802208352751616
More thoughts added
Source Link
  1. I am suspicious that match statements inside match statements is not good practice.
  2. The Command::Add branch in process_command feels a little hacky with the () return. Edit: After thinking more about this problem, I think if I wrapped the branch responses in Ok() then I could return a Result from that function.
  1. I am suspicious that match statements inside match statements is not good practice.
  2. The Command::Add branch in process_command feels a little hacky with the () return.
  1. I am suspicious that match statements inside match statements is not good practice.
  2. The Command::Add branch in process_command feels a little hacky with the () return. Edit: After thinking more about this problem, I think if I wrapped the branch responses in Ok() then I could return a Result from that function.
Add thoughts
Source Link
Loading
added 2 characters in body; edited title
Source Link
Shepmaster
  • 8.8k
  • 27
  • 28
Loading
cite exercise, update question
Source Link
Loading
Source Link
Loading
lang-rust

AltStyle によって変換されたページ (->オリジナル) /