From c18254593976d013df8dda62df1ad4afd2eb2d0f Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Fri, 24 Feb 2023 01:56:24 -0800 Subject: [PATCH] Restore compatibility with rust 1.31 error: cannot find macro `matches!` in this scope --> src/lit.rs:1121:32 | 1121 | if matches!(b, b' ' | b'\t' | b'\n' | b'\r') { | ^^^^^^^ --- src/lit.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/lit.rs b/src/lit.rs index e002ce71ac..0e480c6883 100644 --- a/src/lit.rs +++ b/src/lit.rs @@ -1118,10 +1118,9 @@ mod value { b'"' => '"', b'\r' | b'\n' => loop { let b = byte(s, 0); - if matches!(b, b' ' | b'\t' | b'\n' | b'\r') { - s = &s[1..]; - } else { - continue 'outer; + match b { + b' ' | b'\t' | b'\n' | b'\r' => s = &s[1..], + _ => continue 'outer, } }, b => panic!("unexpected byte {:?} after \\ character in byte literal", b),