-
Notifications
You must be signed in to change notification settings - Fork 124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Polish Rspotify #128
Polish Rspotify #128
Conversation
…otify into ramsay_clean_up_rspotify
… which are almost same.
…g> to keep backward compatibility
…otify into ramsay_clean_up_rspotify
@marioortizmanero I think this PR is ready to review, as for the rest of issues mention in #127 which are mostly about Model, I prefer to create a new PR, otherwise this PR will grow up to be a huge one which is difficult to review. |
Yeah, Sure. I am gonna to review thie PR, and collaborate to update docs and tests :) |
… super::model::*`.
I have refactored |
That's great! Have you measured the compilation times, rather than the number of units? IMO this dependency is worth it because it just removes so much boilerplate, and boilerplate is prone to bugs. |
Yes, I have measured the compilation times in my laptop with git checkout 72c6ee3 # the last commit without `strum` crate.
> hyperfine --warmup 2 'cargo clean && cargo build --no-default-features --features client-reqwest' -i
Benchmark #1: cargo clean && cargo build --no-default-features --features client-reqwest
Time (mean ± σ): 86.715 s ± 3.165 s [User: 276.518 s, System: 14.973 s]
Range (min … max): 82.019 s … 91.968 s 10 runs
git checkout ramsay_clean_up_rspotify
> hyperfine --warmup 2 'cargo clean && cargo build --no-default-features --features client-reqwest' -i
Benchmark #1: cargo clean && cargo build --no-default-features --features client-reqwest
Time (mean ± σ): 88.646 s ± 1.688 s [User: 285.274 s, System: 15.676 s]
Range (min … max): 84.932 s … 90.441 s 10 runs And I think this PR is ready to be reviewed again :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is ready to be merged, if that's what you want.
Merged :) I think I will take times to cross off more items in #127 :) |
Clean up Rspotify, take some points of #127 into consideration.
remove convert_map_to_string and convert_string_to_map inutil.rs
, replaced them withReqwest's
query
method andUrl
struct.senum.rs
file into a module namedenums
and move it intomodel
module.model
module to allow users to writerspotify::model::FullAlbum
instead of the overly verboserspotify::model::album::FullAlbum
.