From 2abd28c6639298e3beac6dc9616f9db7eefeaf77 Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Wed, 23 Nov 2022 12:52:03 +0100 Subject: [PATCH] Add extra characters @ and : in strings --- Cargo.toml | 2 +- src/lib.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index cab085b..d0ba9ae 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ name = "nettext" description = "A text-based data format for cryptographic network protocols" authors = ["Alex Auvolat "] -version = "0.2.1" +version = "0.2.2" edition = "2021" license = "AGPL-3.0" readme = "README.md" diff --git a/src/lib.rs b/src/lib.rs index 6dd26fc..1a7c96a 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -100,7 +100,7 @@ pub(crate) const DICT_OPEN: u8 = b'{'; pub(crate) const DICT_CLOSE: u8 = b'}'; pub(crate) const DICT_ASSIGN: u8 = b'='; pub(crate) const DICT_DELIM: u8 = b','; -pub(crate) const STR_EXTRA_CHARS: &[u8] = b"._-+*?"; +pub(crate) const STR_EXTRA_CHARS: &[u8] = b"._-+*?@:"; pub(crate) fn is_string_char(c: u8) -> bool { c.is_ascii_alphanumeric() || STR_EXTRA_CHARS.contains(&c)