diff options
Diffstat (limited to '')
-rw-r--r-- | src/util/decode_character_reference.rs | 1 | ||||
-rw-r--r-- | src/util/edit_map.rs | 1 | ||||
-rw-r--r-- | src/util/encode.rs | 2 | ||||
-rw-r--r-- | src/util/normalize_identifier.rs | 2 | ||||
-rw-r--r-- | src/util/sanitize_uri.rs | 5 | ||||
-rw-r--r-- | src/util/slice.rs | 3 |
6 files changed, 13 insertions, 1 deletions
diff --git a/src/util/decode_character_reference.rs b/src/util/decode_character_reference.rs index 8ed32f4..30b7853 100644 --- a/src/util/decode_character_reference.rs +++ b/src/util/decode_character_reference.rs @@ -1,6 +1,7 @@ //! Decode character references. use crate::constant::CHARACTER_REFERENCES; +use alloc::string::{String, ToString}; /// Decode named character references. /// diff --git a/src/util/edit_map.rs b/src/util/edit_map.rs index 33c5706..91c93d4 100644 --- a/src/util/edit_map.rs +++ b/src/util/edit_map.rs @@ -9,6 +9,7 @@ //! through another tokenizer and inject the result. use crate::event::Event; +use alloc::{vec, vec::Vec}; /// Shift `previous` and `next` links according to `jumps`. /// diff --git a/src/util/encode.rs b/src/util/encode.rs index 6530011..98b3bcb 100644 --- a/src/util/encode.rs +++ b/src/util/encode.rs @@ -1,5 +1,7 @@ //! Encode HTML. +use alloc::string::String; + /// Encode dangerous html characters. /// /// This ensures that certain characters which have special meaning in HTML are diff --git a/src/util/normalize_identifier.rs b/src/util/normalize_identifier.rs index ddc51f8..2f73bfa 100644 --- a/src/util/normalize_identifier.rs +++ b/src/util/normalize_identifier.rs @@ -1,5 +1,7 @@ //! Normalize identifiers. +use alloc::string::String; + /// Normalize an identifier, as found in [references][label_end] and /// [definitions][definition], so it can be compared when matching. /// diff --git a/src/util/sanitize_uri.rs b/src/util/sanitize_uri.rs index 593a70e..969a4d8 100644 --- a/src/util/sanitize_uri.rs +++ b/src/util/sanitize_uri.rs @@ -1,6 +1,11 @@ //! Make urls safe. use crate::util::encode::encode; +use alloc::{ + format, + string::{String, ToString}, + vec::Vec, +}; /// Make a value safe for injection as a URL. /// diff --git a/src/util/slice.rs b/src/util/slice.rs index be2a381..5dcc352 100644 --- a/src/util/slice.rs +++ b/src/util/slice.rs @@ -2,7 +2,8 @@ use crate::constant::TAB_SIZE; use crate::event::{Event, Kind, Point}; -use std::str; +use alloc::string::String; +use core::str; /// A range between two points. #[derive(Debug)] |