Mo Bitar :ferris: on Nostr: Be careful when defining your own order either when implementing the `Ord` trait or ...
Be careful when defining your own order either when implementing the `Ord` trait or when passing a comparison function when sorting.
Proving total order isn't trivial. Here is an example:
https://github.com/notify-rs/notify/issues/636#RustLang
Published at
2024-09-12 15:37:08Event JSON
{
"id": "08d04e9dc99e78583e9732dd5e58ea6598b0de9f6f87bfccc579fceeeb8c29a0",
"pubkey": "979383f8767c5d795fcad86f82dc7b38b384c1a473710c433014dc2c0fb0e359",
"created_at": 1726155428,
"kind": 1,
"tags": [
[
"t",
"rustlang"
],
[
"proxy",
"https://fosstodon.org/users/mo8it/statuses/113125322180667990",
"activitypub"
]
],
"content": "Be careful when defining your own order either when implementing the `Ord` trait or when passing a comparison function when sorting.\n\nProving total order isn't trivial. Here is an example:\nhttps://github.com/notify-rs/notify/issues/636\n\n#RustLang",
"sig": "cbc26b44c4548898c27877a2f2d9e0dc2e0902629f90bb459f31fdf5fd80daa5aa6b451c148f19c32a476905a96a9c43c1c786a5c25626aa872a76c4afaa7c18"
}