Add support for parsing UUID versions 5, 6, 7, and 8

This commit is contained in:
Tobie Morgan Hitchcock 2022-10-16 15:42:15 +01:00
parent 0bc798cbe0
commit 16638561a2

View file

@ -78,7 +78,16 @@ fn uuid_raw(i: &str) -> IResult<&str, Uuid> {
char('-'), char('-'),
take_while_m_n(4, 4, is_hex), take_while_m_n(4, 4, is_hex),
char('-'), char('-'),
alt((char('1'), char('2'), char('3'), char('4'))), alt((
char('1'),
char('2'),
char('3'),
char('4'),
char('5'),
char('6'),
char('7'),
char('8'),
)),
take_while_m_n(3, 3, is_hex), take_while_m_n(3, 3, is_hex),
char('-'), char('-'),
take_while_m_n(4, 4, is_hex), take_while_m_n(4, 4, is_hex),