rust: fix warnings about wrong type of comments

"rustdoc does not generate documentation for macro expansions"
pull/3906/head
Victor Julien 6 years ago
parent bf1bd407dd
commit b1d4931842

@ -169,8 +169,8 @@ named!(pub parse_generic_option<DHCPOption>,
)) ))
); );
/// Parse a single DHCP option. When option 255 (END) is parsed, the remaining // Parse a single DHCP option. When option 255 (END) is parsed, the remaining
/// data will be consumed. // data will be consumed.
named!(pub parse_option<DHCPOption>, named!(pub parse_option<DHCPOption>,
switch!(peek!(be_u8), switch!(peek!(be_u8),
// End of options case. We consume the rest of the data // End of options case. We consume the rest of the data
@ -190,8 +190,8 @@ named!(pub parse_option<DHCPOption>,
_ => call!(parse_generic_option) _ => call!(parse_generic_option)
)); ));
/// Parse and return all the options. Upon the end of option indicator // Parse and return all the options. Upon the end of option indicator
/// all the data will be consumed. // all the data will be consumed.
named!(pub parse_all_options<Vec<DHCPOption>>, many0!(complete!(call!(parse_option)))); named!(pub parse_all_options<Vec<DHCPOption>>, many0!(complete!(call!(parse_option))));
pub fn dhcp_parse(input: &[u8]) -> IResult<&[u8], DHCPMessage> { pub fn dhcp_parse(input: &[u8]) -> IResult<&[u8], DHCPMessage> {

@ -21,7 +21,7 @@ use nom::{IResult, be_u8, be_u16, be_u32};
use nom; use nom;
use dns::dns::*; use dns::dns::*;
/// Parse a DNS header. // Parse a DNS header.
named!(pub dns_parse_header<DNSHeader>, named!(pub dns_parse_header<DNSHeader>,
do_parse!( do_parse!(
tx_id: be_u16 >> tx_id: be_u16 >>

@ -45,7 +45,7 @@ pub fn smb_get_unicode_string(blob: &[u8]) -> IResult<&[u8], Vec<u8>>
Err(nom::Err::Error(error_position!(blob,ErrorKind::Custom(130)))) Err(nom::Err::Error(error_position!(blob,ErrorKind::Custom(130))))
} }
/// parse an ASCII string that is null terminated // parse an ASCII string that is null terminated
named!(pub smb_get_ascii_string<Vec<u8>>, named!(pub smb_get_ascii_string<Vec<u8>>,
do_parse!( do_parse!(
s: take_until_and_consume!("\x00") s: take_until_and_consume!("\x00")

Loading…
Cancel
Save