Skip to content

Merge branch 'replace_enum_primitive_with_num_enum' of https://github… #82

Merge branch 'replace_enum_primitive_with_num_enum' of https://github…

Merge branch 'replace_enum_primitive_with_num_enum' of https://github… #82

Triggered via push September 6, 2024 07:44
Status Success
Total duration 33s
Artifacts

clippy-check.yml

on: push
clippy_check
22s
clippy_check
Fit to window
Zoom out
Zoom in

Annotations

14 warnings
casting to the same type is unnecessary (`u8` -> `u8`): src/tls_serialize.rs#L18
warning: casting to the same type is unnecessary (`u8` -> `u8`) --> src/tls_serialize.rs:18:18 | 18 | tuple((be_u8((i.0).0 as u8), be_u16(i.1.len() as u16), slice(i.1))) | ^^^^^^^^^^^^^ help: try: `(i.0).0` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast = note: `#[warn(clippy::unnecessary_cast)]` on by default
dereferencing a tuple pattern where every element takes a reference: src/tls_states.rs#L131
warning: dereferencing a tuple pattern where every element takes a reference --> src/tls_states.rs:131:43 | 131 | (s, &TlsMessage::Alert(ref a), _) => { | ^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference help: try removing the `&` and `ref` parts | 131 - (s, &TlsMessage::Alert(ref a), _) => { 131 + (s, TlsMessage::Alert(a), _) => { |
dereferencing a tuple pattern where every element takes a reference: src/tls_states.rs#L115
warning: dereferencing a tuple pattern where every element takes a reference --> src/tls_states.rs:115:12 | 115 | (_,&TlsMessage::Handshake(ref m),_) => tls_state_transition_handshake(state,m,to_server), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference help: try removing the `&` and `ref` parts | 115 - (_,&TlsMessage::Handshake(ref m),_) => tls_state_transition_handshake(state,m,to_server), 115 + (_,TlsMessage::Handshake(m),_) => tls_state_transition_handshake(state,m,to_server), |
dereferencing a tuple pattern where every element takes a reference: src/tls_states.rs#L51
warning: dereferencing a tuple pattern where every element takes a reference --> src/tls_states.rs:51:38 | 51 | (TlsState::None, &TlsMessageHandshake::ClientHello(ref msg), true) => { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference = note: `#[warn(clippy::needless_borrowed_reference)]` on by default help: try removing the `&` and `ref` parts | 51 - (TlsState::None, &TlsMessageHandshake::ClientHello(ref msg), true) => { 51 + (TlsState::None, TlsMessageHandshake::ClientHello(msg), true) => { |
this expression borrows a value the compiler would automatically borrow: src/tls_ec.rs#L185
warning: this expression borrows a value the compiler would automatically borrow --> src/tls_ec.rs:185:13 | 185 | let v = (&i[..len]) | ^^^^^^^^^^^ help: change this to: `i[..len]` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
the following explicit lifetimes could be elided: 'a: src/tls_ciphers.rs#L147
warning: the following explicit lifetimes could be elided: 'a --> src/tls_ciphers.rs:147:22 | 147 | pub fn from_name<'a>(name: &'a str) -> Option<&'static TlsCipherSuite> { | ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 147 - pub fn from_name<'a>(name: &'a str) -> Option<&'static TlsCipherSuite> { 147 + pub fn from_name(name: &str) -> Option<&'static TlsCipherSuite> { |
the following explicit lifetimes could be elided: 'hdr: src/tls.rs#L917
warning: the following explicit lifetimes could be elided: 'hdr --> src/tls.rs:917:41 | 917 | pub fn parse_tls_record_with_header<'i, 'hdr>(i:&'i [u8], hdr:&'hdr TlsRecordHeader ) -> IResult<&'i [u8], Vec<TlsMessage<'i>>> { | ^^^^ ^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 917 - pub fn parse_tls_record_with_header<'i, 'hdr>(i:&'i [u8], hdr:&'hdr TlsRecordHeader ) -> IResult<&'i [u8], Vec<TlsMessage<'i>>> { 917 + pub fn parse_tls_record_with_header<'i>(i:&'i [u8], hdr:&TlsRecordHeader ) -> IResult<&'i [u8], Vec<TlsMessage<'i>>> { |
this expression borrows a value the compiler would automatically borrow: src/tls.rs#L598
warning: this expression borrows a value the compiler would automatically borrow --> src/tls.rs:598:13 | 598 | let v = (&i[..len]) | ^^^^^^^^^^^ help: change this to: `i[..len]` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression borrows a value the compiler would automatically borrow: src/tls.rs#L586
warning: this expression borrows a value the compiler would automatically borrow --> src/tls.rs:586:13 | 586 | let v = (&i[..len]).iter().map(|&it| TlsCompressionID(it)).collect(); | ^^^^^^^^^^^ help: change this to: `i[..len]` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression borrows a value the compiler would automatically borrow: src/tls.rs#L569
warning: this expression borrows a value the compiler would automatically borrow --> src/tls.rs:569:13 | 569 | let v = (&i[..len]) | ^^^^^^^^^^^ help: change this to: `i[..len]` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow = note: `#[warn(clippy::needless_borrow)]` on by default
the following explicit lifetimes could be elided: 'hdr: src/dtls.rs#L267
warning: the following explicit lifetimes could be elided: 'hdr --> src/dtls.rs:267:42 | 267 | pub fn parse_dtls_record_with_header<'i, 'hdr>( | ^^^^ 268 | i: &'i [u8], 269 | hdr: &'hdr DTLSRecordHeader, | ^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes = note: `#[warn(clippy::needless_lifetimes)]` on by default help: elide the lifetimes | 267 ~ pub fn parse_dtls_record_with_header<'i>( 268 | i: &'i [u8], 269 ~ hdr: &DTLSRecordHeader, |
this is an outer doc comment and does not apply to the parent module or crate: src/certificate_transparency.rs#L1
warning: this is an outer doc comment and does not apply to the parent module or crate --> src/certificate_transparency.rs:1:1 | 1 | / ///! 2 | | ///! Certificate Trasparency structures are defined in 3 | | ///! [RFC6962](https://datatracker.ietf.org/doc/html/rfc6962). | |______________________________________________________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#suspicious_doc_comments = note: `#[warn(clippy::suspicious_doc_comments)]` on by default help: use an inner doc comment to document the parent module or crate | 1 + //! 2 + //! Certificate Trasparency structures are defined in 3 + //! [RFC6962](https://datatracker.ietf.org/doc/html/rfc6962). |
clippy_check
The following actions uses node12 which is deprecated and will be forced to run on node16: actions-rs/clippy-check@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
clippy_check
The following actions use a deprecated Node.js version and will be forced to run on node20: actions-rs/clippy-check@v1. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/