Skip to content

Commit

Permalink
Note explicitly that Request::Unknown has no reply parser.
Browse files Browse the repository at this point in the history
  • Loading branch information
khuey committed Jun 11, 2020
1 parent 74a1785 commit d637156
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion generator/src/generator/namespace.rs
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,9 @@ pub(super) fn generate_request_reply_enum(
outln!(out, "}}");
outln!(
out,
"// Get the matching reply parser (if any) for this request"
"/// Get the matching reply parser (if any) for this request"
);
outln!(out, "/// For `Request::Unknown`, `None` is also returned.");
outln!(
out,
"pub fn reply_parser(&self) -> Option<ReplyParsingFunction> {{"
Expand Down
3 changes: 2 additions & 1 deletion src/protocol/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2110,7 +2110,8 @@ impl<'input> Request<'input> {
}
Ok(Request::Unknown(header, remaining))
}
// Get the matching reply parser (if any) for this request
/// Get the matching reply parser (if any) for this request
/// For `Request::Unknown`, `None` is also returned.
pub fn reply_parser(&self) -> Option<ReplyParsingFunction> {
match self {
Request::Unknown(_, _) => None,
Expand Down

0 comments on commit d637156

Please sign in to comment.