Skip to content

Commit 29f39b8

Browse files
committed
syntax: add PartialOrd/Ord to UTF-8 types
1 parent 8a7c589 commit 29f39b8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

regex-syntax/src/utf8.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ const MAX_UTF8_BYTES: usize = 4;
9595
///
9696
/// For example, if there are two ranges, `[C2-DF][80-BF]`, then the byte
9797
/// sequence `\xDD\x61` would not match because `0x61 < 0x80`.
98-
#[derive(Copy, Clone, Eq, PartialEq)]
98+
#[derive(Copy, Clone, Eq, PartialEq, PartialOrd, Ord)]
9999
pub enum Utf8Sequence {
100100
/// One byte range.
101101
One(Utf8Range),
@@ -191,7 +191,7 @@ impl fmt::Debug for Utf8Sequence {
191191
}
192192

193193
/// A single inclusive range of UTF-8 bytes.
194-
#[derive(Clone, Copy, PartialEq, Eq)]
194+
#[derive(Clone, Copy, Eq, PartialEq, PartialOrd, Ord)]
195195
pub struct Utf8Range {
196196
/// Start of byte range (inclusive).
197197
pub start: u8,

0 commit comments

Comments
 (0)