Skip to content

Commit

Permalink
Init tracing_subscriber::fmt in doc tests of detect-targets
Browse files Browse the repository at this point in the history
Signed-off-by: Jiahao XU <[email protected]>
  • Loading branch information
NobodyXu committed Jan 4, 2023
1 parent 5e592de commit c7b2381
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions crates/detect-targets/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@
//! use detect_targets::detect_targets;
//! # #[tokio::main(flavor = "current_thread")]
//! # async fn main() {
//! # tracing_subscriber::fmt()
//! # .without_time()
//! # .with_target(false)
//! # .with_thread_names(false)
//! # .with_thread_ids(false)
//! # .init();
//!
//! let targets = detect_targets().await;
//! eprintln!("Your platform supports targets: {targets:#?}");
Expand All @@ -39,6 +45,12 @@
//! use detect_targets::get_desired_targets;
//! # #[tokio::main(flavor = "current_thread")]
//! # async fn main() {
//! # tracing_subscriber::fmt()
//! # .without_time()
//! # .with_target(false)
//! # .with_thread_names(false)
//! # .with_thread_ids(false)
//! # .init();
//!
//! assert_eq!(
//! get_desired_targets(Some(vec![
Expand All @@ -56,6 +68,12 @@
//! use detect_targets::get_desired_targets;
//! # #[tokio::main(flavor = "current_thread")]
//! # async fn main() {
//! # tracing_subscriber::fmt()
//! # .without_time()
//! # .with_target(false)
//! # .with_thread_names(false)
//! # .with_thread_ids(false)
//! # .init();
//!
//! eprintln!(
//! "Your platform supports targets: {:#?}",
Expand Down

0 comments on commit c7b2381

Please sign in to comment.