fix is_raw_string for multiple prefixes (#6865)

fix `is_raw_string` in the presence of other prefixes (like `rb"foo"`)

fixes #6864
This commit is contained in:
David Szotten 2023-08-25 08:58:26 +01:00 committed by GitHub
parent d1f07008f7
commit 1c66bb80b7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -377,7 +377,7 @@ impl StringPrefix {
}
pub(super) const fn is_raw_string(self) -> bool {
matches!(self, StringPrefix::RAW | StringPrefix::RAW_UPPER)
self.contains(StringPrefix::RAW) || self.contains(StringPrefix::RAW_UPPER)
}
}