Skip to content

SocketAddrV6 Ord and Eq disagree with each other #116711

Closed
@ds84182

Description

@ds84182

I tried this code:

https://play.rust-lang.org/?version=stable&mode=release&edition=2021&gist=5c3bc19334a7cf61d10517e874f8cf0b

I expected to see this happen: Equals, true

Instead, this happened: Equals, false

Meta

yeah so SocketAddr behaves differently in a HashMap vs BTreeMap. Not only is this surprising but it also conflicts with the documentation for Ord & PartialOrd.

Metadata

Metadata

Assignees

Labels

C-bugCategory: This is a bug.T-libsRelevant to the library team, which will review and decide on the PR/issue.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions