mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-08-07 00:00:09 +02:00
taskdump: remove crate disambiguators from output (#8264)
This commit is contained in:
@@ -65,7 +65,8 @@ impl Eq for Symbol {}
|
||||
impl fmt::Display for Symbol {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
if let Some(name) = self.symbol.name() {
|
||||
let name = name.to_string();
|
||||
// Printing this using :# formatting omits crate disambiguators.
|
||||
let name = format!("{name:#}");
|
||||
let name = if let Some((name, _)) = name.rsplit_once("::") {
|
||||
name
|
||||
} else {
|
||||
|
||||
@@ -147,7 +147,7 @@ fn trace_leaf_for_test(meta: &TraceMeta, log: &mut Vec<Vec<String>>) {
|
||||
for frame in bt.frames() {
|
||||
for symbol in frame.symbols() {
|
||||
if let Some(name) = symbol.name() {
|
||||
names.push(strip_symbol_hash(&format!("{name}")).to_owned());
|
||||
names.push(strip_symbol_hash(&format!("{name:#}")).to_owned());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user