How to read `cargo tree -d`

So I want to find duplicates in my dependency tree, I run cargo tree -d and got:

memchr v2.6.4
├── async-compression v0.3.15
│   └── reqwest v0.11.13
memchr v2.6.4
└── nom v7.1.1
    ├── cexpr v0.6.0

Why memchr with the same version number is duplicate?
Is this because of cargo handle build-dependecies and dependencies as different things and cargo builds memchr with different features for build and runtime dependencies?

If so, how can I see what features are different?

I tried cargo tree -d -e features and got:

> cargo tree -d -e features    
error: the `-e features` flag does not support `--duplicates`
1 Like

You can use such command:

cargo tree -d  --format "{p} {f}"
2 Likes

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.