-
Notifications
You must be signed in to change notification settings - Fork 24
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
Cargo fmt + minor stuff #41
Conversation
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.
LGTM.
I would prefer it if the changes to the rejection error to include the body were in a separate PR but I'm ok merging it here too if @jsdw and @niklasad1 are on-board as well.
9f5acde
to
88f4614
Compare
Rolled back the body, it works, but it doesn't even show up in firefox dev tools, so it's kind of useless :) |
One thing though: we have a semi-standard So it'd be: hard_tabs = true
max_width = 120
use_small_heuristics = "Max"
edition = "2018" |
src/base.rs
Outdated
Error::Io(e) => write!(f, "i/o error: {}", e), | ||
Error::UnknownOpCode => f.write_str("unknown opcode"), | ||
Error::ReservedOpCode => f.write_str("reserved opcode"), | ||
Error::FragmentedControl => f.write_str("fragmented control frame"), | ||
Error::InvalidControlFrameLen => f.write_str("invalid control frame length"), | ||
Error::InvalidReservedBit(n) => write!(f, "invalid reserved bit: {}", n), | ||
Error::PayloadTooLarge { actual, maximum } => write!( | ||
f, | ||
"payload too large: len = {}, maximum = {}", | ||
actual, maximum | ||
), |
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.
That's a shame; I liked how this had been laid out :)
Applied! |
cargo fmt
(fixes Isrustfmt
welcome here? #28).concat!
macro in response headers to make them a notch faster.Addedbody
toResponse::Reject
so the user can send intelligible errors back.