-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
reflect PartialOrd #22452
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
alice-i-cecile
merged 32 commits into
bevyengine:main
from
molikto:pr/reflect-partial-cmp
Jan 15, 2026
Merged
reflect PartialOrd #22452
Changes from 5 commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
d2f1c95
macro
molikto a9ed553
wip
molikto 8880f72
finish
molikto 78358a1
fmt
molikto d754962
fmt
molikto 84ffef4
default impls
molikto a55dad9
change doc
molikto cc43dc3
move test
molikto afe7fb7
more tests
molikto 6724313
more tests
molikto f88aba3
fmt
molikto a7afe49
lint
molikto 4cbe879
fix lint
molikto 66e8acf
fmt
molikto f98023f
fix word
molikto d678370
fix lint
molikto e50b3b6
better named fields compare
molikto 15630e5
reorder tests
molikto 70897ff
cleanup
molikto 90c1b25
more tests
molikto 6a856d5
fmt
molikto 7aacd5f
fix lint
molikto 5c0b1e9
Update crates/bevy_reflect/src/impls/core/panic.rs
molikto ef38e57
Update crates/bevy_reflect/src/impls/alloc/borrow.rs
molikto 6fcf1f3
Update crates/bevy_reflect/src/impls/std/path.rs
molikto 208ac6d
Update crates/bevy_reflect/src/impls/std/path.rs
molikto 33c84c1
Update crates/bevy_reflect/src/impls/core/primitives.rs
molikto 464f975
Update crates/bevy_reflect/src/map.rs
molikto 89530ff
Update crates/bevy_reflect/src/map.rs
molikto b2da5bf
Update crates/bevy_reflect/src/map.rs
molikto 38c868f
Merge remote-tracking branch 'origin/main' into pr/reflect-partial-cmp
molikto b1f8274
Merge branch 'pr/reflect-partial-cmp' of github.com:molikto/bevy into…
molikto File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,6 +6,7 @@ impl_reflect_opaque!(::core::net::SocketAddr( | |
| Debug, | ||
| Hash, | ||
| PartialEq, | ||
| PartialOrd, | ||
| Serialize, | ||
| Deserialize | ||
| )); | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I’m not that well versed with reflection code, so this may be a stupid question, but:
Just took a closer look at this: this does not have to be wrapped in an
FQOptionright? I’m awarepartial_cmpreturns anOptionalready, but should thatOption<Ordering>actually be wrapped in another outer layerFQOption? Same comment for theTraitImpl::Customcase for an Option around#impl_fn(self, value). I’m just asking this since the other functions i.e.partial_eqwrap the usual return type in OptionThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you means should have type
PartialReflect::reflect_partial_cmp(..) -> Option<Option<Ordering>>, instead of returningOption<Ordering>?The outter
Optionseems means implemented or not. The innerOptionmeans orderable or not. I feel in practice, merging them is ok and more convenient.