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/machine.rs | |
parent | 96808d0d940e1580cf86e433d0c844e943157e0d (diff) |
fix crash in try_read_string
Diffstat (limited to 'src/machine.rs')
-rw-r--r-- | src/machine.rs | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/machine.rs b/src/machine.rs index 5991912..9f728dd 100644 --- a/src/machine.rs +++ b/src/machine.rs @@ -1,16 +1,10 @@ use crate::entities::try_read_character_reference; use crate::utils::{ - ascii_digit_pat, control_pat, noncharacter_pat, surrogate_pat, whitespace_pat, ControlToken, - State, + ascii_digit_pat, control_pat, ctostr, noncharacter_pat, surrogate_pat, whitespace_pat, + ControlToken, State, }; use crate::{Emitter, Error, Reader, Tokenizer}; -macro_rules! ctostr { - ($c:expr) => { - &*$c.encode_utf8(&mut [0; 4]) - }; -} - // Note: This is not implemented as a method on Tokenizer because there's fields on Tokenizer that // should not be available in this method, such as Tokenizer.to_reconsume or the Reader instance #[inline] |