Skip to content

Fix ambiguity comparing against usize#1097

Merged
cberner merged 1 commit intocberner:masterfrom
glueball:master
Oct 28, 2025
Merged

Fix ambiguity comparing against usize#1097
cberner merged 1 commit intocberner:masterfrom
glueball:master

Conversation

@glueball
Copy link

I have been getting ambiguity errors due to interaction with a dependency that declares a PartialOrd for usize.

I haven't added a test for that case (would require partial ord, which then would be in effect in all the crate), but all the tests in the crate pass, and the change should not controversial enough. In addition, it prevents avoiding an unwrap;)

22 | #[derive(Serialize, Deserialize, Props, redb_derive::Value, Debug, PartialEq, Eq, PartialOrd, Ord, Clone)]
   |                                         ^^^^^^^^^^^^^^^^^^ cannot infer type
   |
   = note: multiple `impl`s satisfying `usize: std::cmp::PartialOrd<_>` found in the following crates: `actix_web`, `core`:
           - impl std::cmp::PartialOrd for usize;
           - impl std::cmp::PartialOrd<actix_web::http::header::content_length::ContentLength> for usize;

@cberner cberner merged commit 32f8a13 into cberner:master Oct 28, 2025
4 checks passed
@cberner
Copy link
Owner

cberner commented Oct 28, 2025

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants