Skip to content

Commit e515e55

Browse files
committed
switch parsing for option to use parse_opt
This is a subtle change in the semantics.
1 parent c80176f commit e515e55

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

crates/formality-core/src/parse.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -211,10 +211,7 @@ where
211211
{
212212
#[tracing::instrument(level = "trace", ret)]
213213
fn parse<'t>(scope: &Scope<L>, text: &'t str) -> ParseResult<'t, Self> {
214-
match T::parse(scope, text) {
215-
Ok((value, text)) => Ok((Some(value), text)),
216-
Err(_) => Ok((None, text)),
217-
}
214+
T::parse_opt(scope, text)
218215
}
219216
}
220217

0 commit comments

Comments
 (0)