Skip to content

Commit

Permalink
Remove leading zeroes
Browse files Browse the repository at this point in the history
  • Loading branch information
evanrittenhouse committed Apr 12, 2024
1 parent c1ca3f0 commit c6bfd6b
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 33 deletions.
34 changes: 17 additions & 17 deletions quiche/src/h3/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -427,42 +427,42 @@ pub enum Error {
pub enum Http3ErrorWireCode {
/// No error. This is used when the connection or stream needs to be closed, but there is no error
/// to signal.
H3NoError = 0x0100,
H3NoError = 0x100,
/// Peer violated protocol requirements in a way that does not match a more specific error code or
/// endpoint declines to use the more specific error code.
H3GeneralProtocolError = 0x0101,
H3GeneralProtocolError = 0x101,
/// An internal error has occurred in the HTTP stack.
H3InternalError = 0x0102,
H3InternalError = 0x102,
/// The endpoint detected that its peer created a stream that it will not accept.
H3StreamCreationError = 0x0103,
H3StreamCreationError = 0x103,
/// A stream required by the HTTP/3 connection was closed or reset.
H3ClosedCriticalStream = 0x0104,
H3ClosedCriticalStream = 0x104,
/// A frame was received that was not permitted in the current state or on the current stream.
H3FrameUnexpected = 0x0105,
H3FrameUnexpected = 0x105,
/// A frame that fails to satisfy layout requirements or with an invalid size was received.
H3FrameError = 0x0106,
H3FrameError = 0x106,
/// The endpoint detected that its peer is exhibiting a behavior that might be generating excessive
/// load.
H3ExcessiveLoad = 0x0107,
H3ExcessiveLoad = 0x107,
/// A stream ID or push ID was used incorrectly, such as exceeding a limit, reducing a limit, or
/// being reused.
H3IdError = 0x0108,
H3IdError = 0x108,
/// An endpoint detected an error in the payload of a SETTINGS frame.
H3SettingsError = 0x0109,
H3SettingsError = 0x109,
/// No SETTINGS frame was received at the beginning of the control stream.
H3MissingSettings = 0x010a,
H3MissingSettings = 0x10a,
/// A server rejected a request without performing any application processing.
H3RequestRejected = 0x010b,
H3RequestRejected = 0x10b,
/// The request or its response (including pushed response) is cancelled.
H3RequestCancelled = 0x010c,
H3RequestCancelled = 0x10c,
/// The client's stream terminated without containing a fully formed request.
H3RequestIncomplete = 0x010d,
H3RequestIncomplete = 0x10d,
/// An HTTP message was malformed and cannot be processed.
H3MessageError = 0x010e,
H3MessageError = 0x10e,
/// The TCP connection established in response to a CONNECT request was reset or abnormally closed.
H3ConnectError = 0x010f,
H3ConnectError = 0x10f,
/// The requested operation cannot be served over HTTP/3. The peer should retry over HTTP/1.1.
H3VersionFallback = 0x0110,
H3VersionFallback = 0x110,
}

impl Error {
Expand Down
32 changes: 16 additions & 16 deletions quiche/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -581,50 +581,50 @@ pub enum Error {
pub enum QuicTransportErrorWireCode {
/// An endpoint uses this with CONNECTION_CLOSE to signal that the connection is being closed
/// abruptly in the absence of any error.
NoError = 0x00,
NoError = 0x0,
/// The endpoint encountered an internal error and cannot continue with the connection.
InternalError = 0x01,
InternalError = 0x1,
/// The server refused to accept a new connection.
ConnectionRefused = 0x02,
ConnectionRefused = 0x2,
/// An endpoint received more data than it permitted in its advertised data limits; see Section 4.
FlowControlError = 0x03,
FlowControlError = 0x3,
/// An endpoint received a frame for a stream identifier that exceeded its advertised stream limit
/// for the corresponding stream type.
StreamLimitError = 0x04,
StreamLimitError = 0x4,
/// An endpoint received a frame for a stream that was not in a state that permitted that frame.
StreamStateError = 0x05,
StreamStateError = 0x5,
/// (1) An endpoint received a STREAM frame containing data that exceeded the previously
/// established final size, (2) an endpoint received a STREAM frame or a RESET_STREAM frame
/// containing a final size that was lower than the size of stream data that was already received,
/// or (3) an endpoint received a STREAM frame or a RESET_STREAM frame containing a different final
/// size to the one already established.
FinalSizeError = 0x06,
FinalSizeError = 0x6,
/// An endpoint received a frame that was badly formatted -- for instance, a frame of an unknown
/// type or an ACK frame that has more acknowledgment ranges than the remainder of the packet could
/// carry.
FrameEncodingError = 0x07,
FrameEncodingError = 0x7,
/// An endpoint received transport parameters that were badly formatted, included an invalid value,
/// omitted a mandatory transport parameter, included a forbidden transport parameter, or were
/// otherwise in error.
TransportParameterError = 0x08,
TransportParameterError = 0x8,
/// An endpoint received transport parameters that were badly formatted, included an invalid value,
/// omitted a mandatory transport parameter, included a forbidden transport parameter, or were
/// otherwise in error.
ConnectionIdLimitError = 0x09,
ConnectionIdLimitError = 0x9,
/// An endpoint detected an error with protocol compliance that was not covered by more specific
/// error codes.
ProtocolViolation = 0x0a,
ProtocolViolation = 0xa,
/// A server received a client Initial that contained an invalid Token field.
InvalidToken = 0x0b,
InvalidToken = 0xb,
/// The application or application protocol caused the connection to be closed.
ApplicationError = 0x0c,
ApplicationError = 0xc,
/// An endpoint has received more data in CRYPTO frames than it can buffer.
CryptoBufferExceeded = 0x0d,
CryptoBufferExceeded = 0xd,
/// An endpoint detected errors in performing key updates.
KeyUpdateError = 0x0e,
KeyUpdateError = 0xe,
/// An endpoint has reached the confidentiality or integrity limit for the AEAD algorithm used by
/// the given connection.
AeadLimitReached = 0x0f,
AeadLimitReached = 0xf,
/// An endpoint has determined that the network path is incapable of supporting QUIC. An endpoint
/// is unlikely to receive a CONNECTION_CLOSE frame carrying this code except when the path does
/// not support a large enough MTU.
Expand Down

0 comments on commit c6bfd6b

Please sign in to comment.