Skip to content
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

chore: replace legacy numeric constant with corresponding one #789

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,6 @@ use std::future::Future;
use std::pin::Pin;
use std::task::{Context, Poll};
use std::time::Duration;
use std::usize;
use tokio::io::{AsyncRead, AsyncWrite, AsyncWriteExt};
use tracing::Instrument;

Expand Down Expand Up @@ -1070,7 +1069,7 @@ impl Builder {
///
/// This function panics if `max` is larger than `u32::MAX`.
pub fn max_send_buffer_size(&mut self, max: usize) -> &mut Self {
assert!(max <= std::u32::MAX as usize);
assert!(max <= u32::MAX as usize);
self.max_send_buffer_size = max;
self
}
Expand Down
2 changes: 0 additions & 2 deletions src/frame/stream_id.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
use std::u32;

/// A stream identifier, as described in [Section 5.1.1] of RFC 7540.
///
/// Streams are identified with an unsigned 31-bit integer. Streams
Expand Down
2 changes: 1 addition & 1 deletion src/hpack/table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use http::method::Method;

use std::collections::VecDeque;
use std::hash::{Hash, Hasher};
use std::{cmp, mem, usize};
use std::{cmp, mem};

/// HPACK encoder table
#[derive(Debug)]
Expand Down
2 changes: 0 additions & 2 deletions src/proto/streams/counts.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
use super::*;

use std::usize;

#[derive(Debug)]
pub(super) struct Counts {
/// Acting as a client or server. This allows us to track which values to
Expand Down
1 change: 0 additions & 1 deletion src/proto/streams/stream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ use super::*;

use std::task::{Context, Waker};
use std::time::Instant;
use std::usize;

/// Tracks Stream related state
///
Expand Down
2 changes: 1 addition & 1 deletion src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -963,7 +963,7 @@ impl Builder {
///
/// This function panics if `max` is larger than `u32::MAX`.
pub fn max_send_buffer_size(&mut self, max: usize) -> &mut Self {
assert!(max <= std::u32::MAX as usize);
assert!(max <= u32::MAX as usize);
self.max_send_buffer_size = max;
self
}
Expand Down