subscriber: fix imports with std only

Turns out that if `std` is enabled but `smallvec` is not, we have some
missing imports. This fixes the build when a crate passes
`default-features = "false` but then enables `std`.

Signed-off-by: Eliza Weisman <eliza@buoyant.io>
This commit is contained in:
Eliza Weisman 2021-10-21 11:47:15 -07:00
parent abe2b6a9f4
commit 7d3bff82d6
2 changed files with 6 additions and 5 deletions

View File

@ -1,9 +1,9 @@
use crate::filter::level::{self, LevelFilter};
#[cfg(not(feature = "smallvec"))]
use alloc::vec;
#[cfg(not(feature = "std"))]
use alloc::{
string::String,
vec::{self, Vec},
};
use alloc::{string::String, vec::Vec};
use core::{cmp::Ordering, fmt, iter::FromIterator, slice, str::FromStr};
use tracing_core::Metadata;
/// Indicates that a string could not be parsed as a filtering directive.

View File

@ -234,8 +234,9 @@ pub struct Scope<'a, R> {
feature! {
#![any(feature = "alloc", feature = "std")]
#[cfg(not(feature = "std"))]
#[cfg(not(feature = "smallvec"))]
use alloc::vec::{self, Vec};
use core::{fmt,iter};
/// An iterator over the parents of a span, ordered from root to leaf.