@@ -30,7 +30,7 @@ pub struct SshVersion<'a> {
3030
3131// Version exchange terminates with CRLF for SSH 2.0 or LF for compatibility
3232// with older versions.
33- fn parse_version ( i : & [ u8 ] ) -> IResult < & [ u8 ] , SshVersion > {
33+ fn parse_version ( i : & [ u8 ] ) -> IResult < & [ u8 ] , SshVersion < ' _ > > {
3434 let ( i, proto) = take_until ( "-" ) ( i) ?;
3535 let ( i, _) = tag ( "-" ) ( i) ?;
3636 let ( i, software) = is_not ( " \r \n " ) ( i) ?;
@@ -53,7 +53,7 @@ fn parse_version(i: &[u8]) -> IResult<&[u8], SshVersion> {
5353/// UTF-8 lines before the final identification line containing the server
5454/// version. This function allocates a vector to store these line slices in
5555/// addition of the advertised version of the SSH implementation.
56- pub fn parse_ssh_identification ( i : & [ u8 ] ) -> IResult < & [ u8 ] , ( Vec < & [ u8 ] > , SshVersion ) > {
56+ pub fn parse_ssh_identification ( i : & [ u8 ] ) -> IResult < & [ u8 ] , ( Vec < & [ u8 ] > , SshVersion < ' _ > ) > {
5757 many_till (
5858 terminated ( take_until ( "\r \n " ) , crlf) ,
5959 delimited ( tag ( "SSH-" ) , parse_version, line_ending) ,
@@ -116,7 +116,7 @@ pub struct SshPacketKeyExchange<'a> {
116116 pub first_kex_packet_follows : bool ,
117117}
118118
119- fn parse_packet_key_exchange ( i : & [ u8 ] ) -> IResult < & [ u8 ] , SshPacket > {
119+ fn parse_packet_key_exchange ( i : & [ u8 ] ) -> IResult < & [ u8 ] , SshPacket < ' _ > > {
120120 let ( i, cookie) = take ( 16usize ) ( i) ?;
121121 let ( i, kex_algs) = parse_string ( i) ?;
122122 let ( i, server_host_key_algs) = parse_string ( i) ?;
@@ -207,7 +207,7 @@ pub struct SshPacketDhInit<'a> {
207207 pub e : & ' a [ u8 ] ,
208208}
209209
210- fn parse_packet_dh_init ( i : & [ u8 ] ) -> IResult < & [ u8 ] , SshPacket > {
210+ fn parse_packet_dh_init ( i : & [ u8 ] ) -> IResult < & [ u8 ] , SshPacket < ' _ > > {
211211 map ( parse_string, |e| {
212212 SshPacket :: DiffieHellmanInit ( SshPacketDhInit { e } )
213213 } ) ( i)
@@ -226,7 +226,7 @@ pub struct SshPacketDhReply<'a> {
226226 pub signature : & ' a [ u8 ] ,
227227}
228228
229- fn parse_packet_dh_reply ( i : & [ u8 ] ) -> IResult < & [ u8 ] , SshPacket > {
229+ fn parse_packet_dh_reply ( i : & [ u8 ] ) -> IResult < & [ u8 ] , SshPacket < ' _ > > {
230230 let ( i, pubkey_and_cert) = parse_string ( i) ?;
231231 let ( i, f) = parse_string ( i) ?;
232232 let ( i, signature) = parse_string ( i) ?;
@@ -292,7 +292,7 @@ impl display SshDisconnectReason {
292292}
293293}
294294
295- fn parse_packet_disconnect ( i : & [ u8 ] ) -> IResult < & [ u8 ] , SshPacket > {
295+ fn parse_packet_disconnect ( i : & [ u8 ] ) -> IResult < & [ u8 ] , SshPacket < ' _ > > {
296296 let ( i, reason_code) = be_u32 ( i) ?;
297297 let ( i, description) = parse_string ( i) ?;
298298 let ( i, lang) = parse_string ( i) ?;
@@ -326,7 +326,7 @@ pub struct SshPacketDebug<'a> {
326326 pub lang : & ' a [ u8 ] ,
327327}
328328
329- fn parse_packet_debug ( i : & [ u8 ] ) -> IResult < & [ u8 ] , SshPacket > {
329+ fn parse_packet_debug ( i : & [ u8 ] ) -> IResult < & [ u8 ] , SshPacket < ' _ > > {
330330 let ( i, display) = be_u8 ( i) ?;
331331 let ( i, message) = parse_string ( i) ?;
332332 let ( i, lang) = parse_string ( i) ?;
@@ -364,7 +364,7 @@ pub enum SshPacket<'a> {
364364///
365365/// Packet structure is defined in [RFC4253 Section 6](https://tools.ietf.org/html/rfc4253#section-6) and
366366/// message codes are defined in [RFC4253 Section 12](https://tools.ietf.org/html/rfc4253#section-12).
367- pub fn parse_ssh_packet ( i : & [ u8 ] ) -> IResult < & [ u8 ] , ( SshPacket , & [ u8 ] ) > {
367+ pub fn parse_ssh_packet ( i : & [ u8 ] ) -> IResult < & [ u8 ] , ( SshPacket < ' _ > , & [ u8 ] ) > {
368368 let ( i, packet_length) = be_u32 ( i) ?;
369369 let ( i, padding_length) = be_u8 ( i) ?;
370370 if padding_length as u32 + 1 > packet_length {
0 commit comments