Closed neachdainn closed 5 years ago
Maybe this isn't the correct way to do it. I thought nng_*_id
returned an unsigned integer but it looks like it doesn't. Perhaps the correct implementation would be more along the lines of:
impl PartialEq for nng_socket {
fn eq(&self, other: &Self) -> bool {
unsafe {
let us = nng_socket_id(self);
let them = nng_socket_id(other);
us == them
}
}
}
And at that point, it might be out of the scope of this crate... Or it might not, since this is the only crate that can implement traits for the NNG types. I'm not sure what is correct here.
I think I've decided that I don't like this.
Closes #4