πŸ’¬ Reply by Wappen

2024-11-15 πŸ”„ programmerhumor ┃ RE: Dunstabzugshaubitze

Equality in rust is value equality per default, that’s what these traits are for. If you want to check pointer equality you’d use the std::ptr::eq function to check if two pointers are equal, which is rather rare in practice. You can also implement the PartialEq trait yourself if you need custom equality checks.

Wappen

Dunstabzugshaubitze

πŸ”„ programmerhumor

πŸ’¬ Replies

2024-11-15 brisk ┃ 1πŸ’¬

I worked on software at one point that had at it’s core a number of β€œmodes” that it switched between. It was, at the time, in the process of migrating from enums and switch/case trees to an […]

────

View parent post

View first post in thread

────

πŸ“‘ Local feed

πŸ•οΈ Communities

πŸ”₯ Hashtags

πŸ”Ž Search posts

πŸ”‘ Sign in

πŸ“Š Status

πŸ›Ÿ Help