Skip to content

Clippy run and derive Default for Buffer #817

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

Merged
merged 1 commit into from
Jun 13, 2016
Merged

Clippy run and derive Default for Buffer #817

merged 1 commit into from
Jun 13, 2016

Conversation

leoyvens
Copy link
Contributor

@leoyvens leoyvens commented Jun 4, 2016

Some refactorings, most were suggested by clippy.

@GitCop
Copy link

GitCop commented Jun 4, 2016

Thanks for contributing! Unfortunately, I'm here to tell you there were the following style issues with your Pull Request:

  • Commit: e100e60
    • Commits must be in the following format: %{type}(%{scope}): %{description}

Guidelines are available at https://github.com/hyperium/hyper/blob/master/CONTRIBUTING.md


This message was auto-generated by https://gitcop.com

@@ -28,7 +28,7 @@ use std::cmp::Ordering;
/// Registry](http://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml) which is
/// the source for this enum (with one exception, 418 I'm a teapot, which is
/// inexplicably not in the register).
#[derive(Debug, Hash)]
#[derive(Debug, Hash, Copy, Clone)]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The manual implementations were deliberate actually, because it's faster to compile than rustc generating the huge match statements for this big enum...

@seanmonstar
Copy link
Member

Thanks for the pull request! Sorry for the delay, I've been traveling and only have occasional computer access.

These all look really good. The only refactor that gives me pause is the derives for the StatusCode enum. If the compiler no longer takes a noticeably longer time generating them, then the fix looks fine. Last I checked, those derives took added several seconds each to the compilation.

@leoyvens
Copy link
Contributor Author

leoyvens commented Jun 12, 2016

Benchmarked on nightly with precision of seconds, no change in compile times for debug or release. I suspect the improvement is due to rust-lang/rust#31414 which is in beta however. Should this wait for that change to land in stable?

@seanmonstar
Copy link
Member

Ah, glad to see that PR. Yes, I'd probably want to wait to introduce the
change when stable users have a safe way of keeping compile times better.

On Sun, Jun 12, 2016, 5:58 PM Leonardo Yvens [email protected]
wrote:

Benchmarked on nightly with precision of seconds, no change in compile
times for debug or release. However I suspect the improvement is due to
rust-lang/rust#31414 rust-lang/rust#31414 which
I believe is in beta. Should this wait for that change to land in stable?


You are receiving this because you commented.

Reply to this email directly, view it on GitHub
#817 (comment), or mute
the thread
https://github.com/notifications/unsubscribe/AADJF-CC4Aeg-o7pac15rgREEn8Uvhy2ks5qLCyugaJpZM4IuI8b
.

@leoyvens
Copy link
Contributor Author

Very well, reverted changes to status.rs.

@seanmonstar
Copy link
Member

Thank you!

@seanmonstar seanmonstar merged commit f20d595 into hyperium:master Jun 13, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants