Rust dev (@ 1Password) and game modder. I like Factorio, FFXIV, (modded) Minecraft, and similar!

  • 0 Posts
  • 2 Comments
Joined 1 year ago
cake
Cake day: June 23rd, 2023

help-circle

  • I’m guessing you’re asking because you got a clippy lint. Using Ordering allows you to match the output therefore only calling partial_ord once, compared to using an if-else chain which might call it several times. In many/most cases this would probably be compiler optimized anyway but this makes it explicit.