Improve documentation.

This commit is contained in:
Damian Poddebniak 2021-05-23 14:02:34 +02:00
parent 21138c353b
commit bffba030df
2 changed files with 5 additions and 5 deletions

View File

@ -16,8 +16,8 @@ use nom::{
/// Greeting = ( "220 " (Domain / address-literal) [ SP textstring ] CRLF ) /
/// ( "220-" (Domain / address-literal) [ SP textstring ] CRLF
/// *( "220-" [ textstring ] CRLF )
/// "220" [ SP textstring ] CRLF )
/// *( "220-" [ textstring ] CRLF )
/// "220" [ SP textstring ] CRLF )
pub fn Greeting(input: &[u8]) -> IResult<&[u8], GreetingType> {
let mut parser = alt((
map(
@ -89,7 +89,7 @@ pub fn textstring(input: &[u8]) -> IResult<&[u8], &str> {
}
/// Reply-line = *( Reply-code "-" [ textstring ] CRLF )
/// Reply-code [ SP textstring ] CRLF
/// Reply-code [ SP textstring ] CRLF
pub fn Reply_line(input: &[u8]) -> IResult<&[u8], &[u8]> {
let parser = tuple((
many0(tuple((Reply_code, tag(b"-"), opt(textstring), CRLF))),

View File

@ -14,8 +14,8 @@ use nom::{
/// ehlo-ok-rsp = ( "250 " Domain [ SP ehlo-greet ] CRLF ) /
/// ( "250-" Domain [ SP ehlo-greet ] CRLF
/// *( "250-" ehlo-line CRLF )
/// "250 " ehlo-line CRLF )
/// *( "250-" ehlo-line CRLF )
/// "250 " ehlo-line CRLF )
///
/// Edit: collapsed ("250" SP) to ("250 ")
pub fn ehlo_ok_rsp(input: &[u8]) -> IResult<&[u8], EhloOkResp> {