How to Resolve Dependency Conflicts in Cargo

Fix Cargo dependency conflicts by adding resolver = "2" or "3" to your workspace Cargo.toml configuration.

Resolve dependency conflicts by updating your Cargo.toml to use the resolver = "2" or resolver = "3" setting in the [workspace] section. This tells Cargo to use the newer dependency resolution algorithm that handles version conflicts more effectively across workspace members.

[workspace]
members = ["packages/tools"]
default-members = ["packages/tools"]
resolver = "2"

If you are using Rust 2024 edition or later, you can also set resolver = "3" for the most advanced conflict resolution.