From bffba030dffe3e311178a2c64d145cca7a1662c6 Mon Sep 17 00:00:00 2001 From: Damian Poddebniak Date: Sun, 23 May 2021 14:02:34 +0200 Subject: [PATCH] Improve documentation. --- src/parse/replies.rs | 6 +++--- src/parse/response.rs | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/parse/replies.rs b/src/parse/replies.rs index f358992..0edf9b0 100644 --- a/src/parse/replies.rs +++ b/src/parse/replies.rs @@ -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))), diff --git a/src/parse/response.rs b/src/parse/response.rs index b142072..26bbd97 100644 --- a/src/parse/response.rs +++ b/src/parse/response.rs @@ -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> {