spenserblack / github-stats-rs

A tool for using Github's API
Apache License 2.0
1 stars 5 forks source link

Replace search area string with SearchArea enum #24

Closed eupn closed 5 years ago

eupn commented 5 years ago

Make the code less error-prone by limiting the user's input.

eupn commented 5 years ago

@spenserblack yeah, this will do the job! This is more about how one wants to settle in a design decision space. To reduce the end user's burden with additional enums, sure we can hide them internally and use the constructor instead to still be able to restrict the user from providing invalid "area" value.

spenserblack commented 5 years ago

Hi @eupn! I just pushed up a commit that fixed this, but if you still want to work on this type of thing, I've created #25