diff options
author | Markus Unterwaditzer <markus-honeypot@unterwaditzer.net> | 2021-11-27 23:33:26 +0100 |
---|---|---|
committer | Markus Unterwaditzer <markus-honeypot@unterwaditzer.net> | 2021-11-27 23:43:54 +0100 |
commit | 95afc5359e940398498310d46e81352f04b43a49 (patch) | |
tree | b89915478a19f7f8673bb4663e9e7fa112abf09c /src/utils.rs | |
parent | 96808d0d940e1580cf86e433d0c844e943157e0d (diff) |
fix crash in try_read_string
Diffstat (limited to 'src/utils.rs')
-rw-r--r-- | src/utils.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/utils.rs b/src/utils.rs index 67db1b9..c3d2f1a 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -162,3 +162,11 @@ pub enum ControlToken { Eof, Continue, } + +macro_rules! ctostr { + ($c:expr) => { + &*$c.encode_utf8(&mut [0; 4]) + }; +} + +pub(crate) use ctostr; |