Skip to content

Change licence to MIT+Apache 2, with agreement of all authors (Closes… #19

Change licence to MIT+Apache 2, with agreement of all authors (Closes…

Change licence to MIT+Apache 2, with agreement of all authors (Closes… #19

GitHub Actions / clippy succeeded Mar 13, 2024 in 0s

clippy

9 warnings

Details

Results

Message level Amount
Internal compiler error 0
Error 0
Warning 9
Note 0
Help 0

Versions

  • rustc 1.76.0 (07dca489a 2024-02-04)
  • cargo 1.76.0 (c84b36747 2024-01-18)
  • clippy 0.1.76 (07dca48 2024-02-04)

Annotations

Check warning on line 80 in src/ssh.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the following explicit lifetimes could be elided: 'a

warning: the following explicit lifetimes could be elided: 'a
  --> src/ssh.rs:80:20
   |
80 | fn parse_name_list<'a>(i: &'a [u8]) -> IResult<&'a [u8], Vec<&str>> {
   |                    ^^      ^^                   ^^            ^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
   |
80 - fn parse_name_list<'a>(i: &'a [u8]) -> IResult<&'a [u8], Vec<&str>> {
80 + fn parse_name_list(i: &[u8]) -> IResult<&[u8], Vec<&str>> {
   |

Check warning on line 113 in src/serialize.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the following explicit lifetimes could be elided: 'b

warning: the following explicit lifetimes could be elided: 'b
   --> src/serialize.rs:113:27
    |
113 | pub fn gen_ssh_packet<'a, 'b>(
    |                           ^^
114 |     x: (&'a mut [u8], usize),
115 |     p: &'b SshPacket,
    |         ^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
    |
113 ~ pub fn gen_ssh_packet<'a>(
114 |     x: (&'a mut [u8], usize),
115 ~     p: &SshPacket,
    |

Check warning on line 84 in src/serialize.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the following explicit lifetimes could be elided: 'b

warning: the following explicit lifetimes could be elided: 'b
  --> src/serialize.rs:84:27
   |
84 | fn gen_packet_payload<'a, 'b>(
   |                           ^^
85 |     x: (&'a mut [u8], usize),
86 |     p: &'b SshPacket,
   |         ^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
   |
84 ~ fn gen_packet_payload<'a>(
85 |     x: (&'a mut [u8], usize),
86 ~     p: &SshPacket,
   |

Check warning on line 57 in src/serialize.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the following explicit lifetimes could be elided: 'b

warning: the following explicit lifetimes could be elided: 'b
  --> src/serialize.rs:57:25
   |
57 | fn gen_packet_debug<'a, 'b>(
   |                         ^^
58 |     x: (&'a mut [u8], usize),
59 |     p: &'b SshPacketDebug,
   |         ^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
   |
57 ~ fn gen_packet_debug<'a>(
58 |     x: (&'a mut [u8], usize),
59 ~     p: &SshPacketDebug,
   |

Check warning on line 47 in src/serialize.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the following explicit lifetimes could be elided: 'b

warning: the following explicit lifetimes could be elided: 'b
  --> src/serialize.rs:47:30
   |
47 | fn gen_packet_disconnect<'a, 'b>(
   |                              ^^
48 |     x: (&'a mut [u8], usize),
49 |     p: &'b SshPacketDisconnect,
   |         ^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
   |
47 ~ fn gen_packet_disconnect<'a>(
48 |     x: (&'a mut [u8], usize),
49 ~     p: &SshPacketDisconnect,
   |

Check warning on line 37 in src/serialize.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the following explicit lifetimes could be elided: 'b

warning: the following explicit lifetimes could be elided: 'b
  --> src/serialize.rs:37:28
   |
37 | fn gen_packet_dh_reply<'a, 'b>(
   |                            ^^
38 |     x: (&'a mut [u8], usize),
39 |     p: &'b SshPacketDhReply,
   |         ^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
   |
37 ~ fn gen_packet_dh_reply<'a>(
38 |     x: (&'a mut [u8], usize),
39 ~     p: &SshPacketDhReply,
   |

Check warning on line 15 in src/serialize.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the following explicit lifetimes could be elided: 'b

warning: the following explicit lifetimes could be elided: 'b
  --> src/serialize.rs:15:32
   |
15 | fn gen_packet_key_exchange<'a, 'b>(
   |                                ^^
16 |     x: (&'a mut [u8], usize),
17 |     p: &'b SshPacketKeyExchange,
   |         ^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
   |
15 ~ fn gen_packet_key_exchange<'a>(
16 |     x: (&'a mut [u8], usize),
17 ~     p: &SshPacketKeyExchange,
   |

Check warning on line 8 in src/serialize.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the following explicit lifetimes could be elided: 'b

warning: the following explicit lifetimes could be elided: 'b
  --> src/serialize.rs:8:19
   |
8  | fn gen_string<'a, 'b>(
   |                   ^^
9  |     x: (&'a mut [u8], usize),
10 |     s: &'b [u8],
   |         ^^
   |
   = 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
   |
8  ~ fn gen_string<'a>(
9  |     x: (&'a mut [u8], usize),
10 ~     s: &[u8],
   |

Check warning on line 46 in src/mpint.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

casting to the same type is unnecessary (`usize` -> `usize`)

warning: casting to the same type is unnecessary (`usize` -> `usize`)
  --> src/mpint.rs:46:19
   |
46 |             btake((i.len() * 8usize - 1) as usize),
   |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(i.len() * 8usize - 1)`
   |
   = 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