Skip to content

Conversation

@rydb
Copy link

@rydb rydb commented Jan 13, 2025

RawValue does not currently implement PartialEq, which is a blocker for:
gltf-rs/gltf#442

This pr fixes implements PartialEq for RawValue to fix that.

@rydb rydb changed the title added partialeq to RawValue add partialeq to RawValue Jan 14, 2025
Copy link
Member

@dtolnay dtolnay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR!

I think I would prefer not to add the impl. People are going to find it unexpected that the equal JSON values [ null ] and [null] would be considered unequal by RawValue.

The underlying JSON bytes are publicly exposed though, so any downstream code can use raw_a.get() == raw_b.get() without this impl when this is the behavior they want.

@dtolnay dtolnay closed this Jan 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants