Skip to content

Commit

Permalink
fix branch/bytes/multi test imports for the alloc feature
Browse files Browse the repository at this point in the history
  • Loading branch information
nickelc authored and Geal committed Aug 5, 2021
1 parent 02ff562 commit 6f1d7a5
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 9 deletions.
4 changes: 2 additions & 2 deletions src/branch/tests.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
use crate::branch::{alt, permutation};
use crate::bytes::streaming::tag;
use crate::error::ErrorKind;
use crate::internal::{Err, IResult, Needed};
#[cfg(feature = "alloc")]
use crate::{
branch::{alt, permutation},
bytes::streaming::tag,
error::ParseError,
lib::std::{
fmt::Debug,
Expand Down
7 changes: 6 additions & 1 deletion src/bytes/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -436,15 +436,20 @@ macro_rules! take_until1 (

#[cfg(test)]
mod tests {
#[cfg(feature = "alloc")]
use crate::bytes::complete::escaped_transform;
#[cfg(feature = "alloc")]
use crate::bytes::complete::tag;
use crate::character::is_alphabetic;
use crate::character::streaming::{
alpha1 as alpha, alphanumeric1 as alphanumeric, digit1 as digit, hex_digit1 as hex_digit,
multispace1 as multispace, oct_digit1 as oct_digit, space1 as space,
};
use crate::bytes::complete::{escaped_transform, tag};
use crate::error::ErrorKind;
use crate::internal::{Err, IResult, Needed};
#[cfg(feature = "alloc")]
use crate::branch::alt;
#[cfg(feature = "alloc")]
use crate::combinator::{map, value};
#[cfg(feature = "alloc")]
use crate::lib::std::string::String;
Expand Down
15 changes: 9 additions & 6 deletions src/multi/tests.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
use super::{
count, fold_many0, fold_many1, fold_many_m_n, length_count, length_data, length_value, many0,
many0_count, many1, many1_count, many_m_n, many_till, separated_list0, separated_list1,
};
#[cfg(feature = "alloc")]
use crate::lib::std::vec::Vec;
use super::{length_data, length_value, many0_count, many1_count};
use crate::{
bytes::streaming::tag,
character::streaming::digit1 as digit,
Expand All @@ -13,6 +8,14 @@ use crate::{
number::streaming::{be_u16, be_u8},
sequence::{pair, tuple},
};
#[cfg(feature = "alloc")]
use crate::{
lib::std::vec::Vec,
multi::{
count, length_count, fold_many0, fold_many1, fold_many_m_n, many0, many1, many_m_n, many_till,
separated_list0, separated_list1,
},
};

#[test]
#[cfg(feature = "alloc")]
Expand Down

0 comments on commit 6f1d7a5

Please sign in to comment.