mirror of
https://github.com/tokio-rs/tracing.git
synced 2025-10-02 07:20:35 +00:00
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:
parent
abe2b6a9f4
commit
7d3bff82d6
@ -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.
|
||||
|
@ -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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user