Skip to content

Commit 6e7907e

Browse files
inashivbvictorjulien
authored andcommitted
http2: fix unneeded cast found by clippy
error: casting to the same type is unnecessary (`u16` -> `u16`) --> src/http2/http2.rs:1286:47 | 1286 | if !orig_state.is_null() && orig_proto == ALPROTO_HTTP1 as u16 { | ^^^^^^^^^^^^^^^^^^^^ help: try: `ALPROTO_HTTP1` | = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.95.0/index.html#unnecessary_cast note: the lint level is defined here --> src/lib.rs:23:38 | 23 | #![cfg_attr(feature = "strict", deny(warnings))] | ^^^^^^^^ = note: `#[deny(clippy::unnecessary_cast)]` implied by `#[deny(warnings)]`
1 parent 256aeae commit 6e7907e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

rust/src/http2/http2.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1283,7 +1283,7 @@ pub extern "C" fn rs_http2_state_new(
12831283
let state = HTTP2State::new();
12841284
let boxed = Box::new(state);
12851285
let r = Box::into_raw(boxed) as *mut _;
1286-
if !orig_state.is_null() && orig_proto == ALPROTO_HTTP1 as u16 {
1286+
if !orig_state.is_null() && orig_proto == ALPROTO_HTTP1 {
12871287
unsafe {
12881288
HTTP2MimicHttp1Request(orig_state, r);
12891289
}

0 commit comments

Comments
 (0)