Skip to content

Commit

Permalink
Update name of ExprReturn parse function to match variant name
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed Nov 6, 2023
1 parent c274590 commit c6a651a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/expr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1614,7 +1614,7 @@ pub(crate) mod parsing {
} else if input.peek(Token![continue]) {
input.parse().map(Expr::Continue)
} else if input.peek(Token![return]) {
expr_ret(input, allow_struct).map(Expr::Return)
expr_return(input, allow_struct).map(Expr::Return)
} else if input.peek(token::Bracket) {
array_or_repeat(input)
} else if input.peek(Token![let]) {
Expand Down Expand Up @@ -2223,7 +2223,7 @@ pub(crate) mod parsing {
impl Parse for ExprReturn {
fn parse(input: ParseStream) -> Result<Self> {
let allow_struct = AllowStruct(true);
expr_ret(input, allow_struct)
expr_return(input, allow_struct)
}
}

Expand Down Expand Up @@ -2462,7 +2462,7 @@ pub(crate) mod parsing {
}

#[cfg(feature = "full")]
fn expr_ret(input: ParseStream, allow_struct: AllowStruct) -> Result<ExprReturn> {
fn expr_return(input: ParseStream, allow_struct: AllowStruct) -> Result<ExprReturn> {
Ok(ExprReturn {
attrs: Vec::new(),
return_token: input.parse()?,
Expand Down

0 comments on commit c6a651a

Please sign in to comment.