bytecodealliance / rustix

Safe Rust bindings to POSIX-ish APIs
Other
1.46k stars 152 forks source link

`SendFlags::EOT` seems to be misspelled #1053

Closed KarsMulder closed 5 months ago

KarsMulder commented 5 months ago

SendFlags::EOT is currently defined as:

/// `MSG_EOT`
const EOT = c::MSG_EOR;

I.e. the flag that appears to be called MSG_EOT actually compiles to MSG_EOR. Indeed, MSG_EOR is the correct name of this send flag according to the man page; a flag called called MSG_EOT doesn't actually exist in Linux as far as I can tell.

I propose that SendFlags::EOT gets renamed to SendFlags::EOR. This, of course, is a breaking API change.

sunfishcode commented 5 months ago

Renaming it would be breaking, but we can add the new name and deprecate the old one without a breaking change. I've now opened #1054 to do that.