Skip to content

Commit

Permalink
fix warnings on latest rust (#48013)
Browse files Browse the repository at this point in the history
  • Loading branch information
jkarneges authored Jun 13, 2024
1 parent 83cf430 commit e05c4e6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/bin/pushpin-connmgr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ fn main() {
1 => LevelFilter::Warn,
2 => LevelFilter::Info,
3 => LevelFilter::Debug,
4..=core::usize::MAX => LevelFilter::Trace,
4..=usize::MAX => LevelFilter::Trace,
_ => unreachable!(),
};

Expand Down
14 changes: 7 additions & 7 deletions src/core/http1/protocol.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1504,7 +1504,7 @@ impl ClientResponseBody {
}
BodySize::NoBody => Ok(RecvStatus::Complete(
ClientFinished {
headers_range: None,
_headers_range: None,
persistent: self.state.persistent,
},
0,
Expand Down Expand Up @@ -1535,7 +1535,7 @@ impl ClientResponseBody {

Ok(RecvStatus::Complete(
ClientFinished {
headers_range: None,
_headers_range: None,
persistent: state.persistent,
},
size,
Expand Down Expand Up @@ -1567,7 +1567,7 @@ impl ClientResponseBody {
if src.len() - size == 0 && end {
Ok(RecvStatus::Complete(
ClientFinished {
headers_range: None,
_headers_range: None,
persistent: self.state.persistent,
},
size,
Expand Down Expand Up @@ -1648,7 +1648,7 @@ impl ClientResponseBody {

return Ok(RecvStatus::Complete(
ClientFinished {
headers_range: Some((headers_start, headers_end)),
_headers_range: Some((headers_start, headers_end)),
persistent: state.persistent,
},
headers_end,
Expand Down Expand Up @@ -1697,7 +1697,7 @@ impl ClientResponseBody {
}

pub struct ClientFinished {
pub headers_range: Option<(usize, usize)>,
_headers_range: Option<(usize, usize)>,
pub persistent: bool,
}

Expand Down Expand Up @@ -5002,7 +5002,7 @@ mod tests {

let (r, headers) = match r {
Ok(RecvStatus::Complete(finished, read, written)) => {
if let Some((start, end)) = finished.headers_range {
if let Some((start, end)) = finished._headers_range {
let headers_data = &test.data.as_bytes()[start..end];
let scratch = unsafe { scratch.assume_init_mut() };

Expand Down Expand Up @@ -5168,7 +5168,7 @@ mod tests {
_ => panic!("unexpected status"),
};

assert_eq!(finished.headers_range, None);
assert_eq!(finished._headers_range, None);
assert_eq!(finished.persistent, true);
}

Expand Down

0 comments on commit e05c4e6

Please sign in to comment.