Skip to content

Commit

Permalink
Fix cargo check --no-default-features
Browse files Browse the repository at this point in the history
  • Loading branch information
zolyfarkas committed Jan 26, 2024
1 parent ac10b3f commit 0c5c011
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/detectors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ impl LongRunningTaskDetector {
let workers = Arc::new(WorkerSet::new());
if current_threaded {
workers.add(ThreadInfo::new());
let runtime_builder = tokio::runtime::Builder::new_current_thread();
let runtime_builder = Builder::new_current_thread();
(
LongRunningTaskDetector {
interval,
Expand All @@ -210,7 +210,7 @@ impl LongRunningTaskDetector {
runtime_builder,
)
} else {
let mut runtime_builder = tokio::runtime::Builder::new_multi_thread();
let mut runtime_builder = Builder::new_multi_thread();
let workers_clone = Arc::clone(&workers);
let workers_clone2 = Arc::clone(&workers);
runtime_builder
Expand Down
1 change: 1 addition & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,4 +121,5 @@ cfg_rt! {
mod task;
pub use task::{Instrumented, TaskMetrics, TaskMonitor};

#[cfg(all(feature = "rt"))]

Check failure on line 124 in src/lib.rs

View workflow job for this annotation

GitHub Actions / check

unneeded sub `cfg` when there is only one condition
pub mod detectors;

0 comments on commit 0c5c011

Please # to comment.