From e96204d2b02d213748b2929fea2e02de6b4ca156 Mon Sep 17 00:00:00 2001 From: Fredrik Fornwall Date: Mon, 19 Feb 2024 16:35:43 +0100 Subject: [PATCH] Remove dependency on `itertools` (#36) --- backtrace/Cargo.toml | 1 - backtrace/src/lib.rs | 8 ++++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/backtrace/Cargo.toml b/backtrace/Cargo.toml index ce1be6a..67c5830 100644 --- a/backtrace/Cargo.toml +++ b/backtrace/Cargo.toml @@ -14,7 +14,6 @@ categories = ["asynchronous", "development-tools::debugging"] async-backtrace-attributes = { version = "0.2", path = "../attributes" } dashmap = "5.4.0" futures = "0.3.21" -itertools = "0.10.5" once_cell = "1.0.0" pin-project-lite = "0.2" rustc-hash = "1.1.0" diff --git a/backtrace/src/lib.rs b/backtrace/src/lib.rs index d047e40..ba8e9c9 100644 --- a/backtrace/src/lib.rs +++ b/backtrace/src/lib.rs @@ -168,10 +168,10 @@ macro_rules! frame { /// If `wait_for_running_tasks` is `true`, this routine may deadlock if any /// non-async lock is held which may also be held by a Framed task. pub fn taskdump_tree(wait_for_running_tasks: bool) -> String { - itertools::join( - tasks().map(|task| task.pretty_tree(wait_for_running_tasks)), - "\n", - ) + tasks() + .map(|task| task.pretty_tree(wait_for_running_tasks)) + .collect::>() + .join("\n") } /// Produces a backtrace starting at the currently-active frame (if any).