Skip to content

Commit 6f09025

Browse files
committed
Fixed API regression in text::ascii::keyword that was causing breakage
1 parent 046dc8a commit 6f09025

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

src/text.rs

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -583,7 +583,7 @@ pub mod ascii {
583583
I: StrInput<'src>,
584584
I::Slice: PartialEq,
585585
I::Token: Char + fmt::Debug + 'src,
586-
S: Borrow<I::Slice> + Clone + 'src,
586+
S: PartialEq<I::Slice> + Clone + 'src,
587587
E: ParserExtra<'src, I> + 'src,
588588
E::Error: LabelError<'src, I, TextExpected<'src, I>> + LabelError<'src, I, S>,
589589
{
@@ -605,14 +605,10 @@ pub mod ascii {
605605
*/
606606
ident()
607607
.try_map(move |s: I::Slice, span| {
608-
if &s == keyword.borrow() {
608+
if keyword == s {
609609
Ok(())
610610
} else {
611-
Err(LabelError::expected_found(
612-
[TextExpected::Identifier(keyword.borrow().clone())],
613-
None,
614-
span,
615-
))
611+
Err(LabelError::expected_found([keyword.clone()], None, span))
616612
}
617613
})
618614
.to_slice()

0 commit comments

Comments
 (0)