diff --git a/src/buffer.rs b/src/buffer.rs index 46c8215..cd3efbd 100644 --- a/src/buffer.rs +++ b/src/buffer.rs @@ -1,5 +1,7 @@ // SPDX-License-Identifier: MIT OR Apache-2.0 +#[cfg(not(feature = "std"))] +use alloc::{string::String, vec::Vec}; use core::{cmp, fmt}; use unicode_segmentation::UnicodeSegmentation; diff --git a/src/buffer_line.rs b/src/buffer_line.rs index ee10acc..015c5e8 100644 --- a/src/buffer_line.rs +++ b/src/buffer_line.rs @@ -1,3 +1,5 @@ +#[cfg(not(feature = "std"))] +use alloc::{string::String, vec::Vec}; use core::mem; use crate::{