io-uring icon indicating copy to clipboard operation
io-uring copied to clipboard

feat: more derive traits for Fixed type

Open andrewgazelka opened this issue 1 year ago • 3 comments

andrewgazelka avatar Apr 24 '24 19:04 andrewgazelka

There's no harm in that, but Fixed is just an interface constraint and you're not expected to put it into a HashMap.

quininer avatar Apr 28 '24 11:04 quininer

There's no harm in that, but Fixed is just an interface constraint and you're not expected to put it into a HashMap.

Is there any reason why putting it in a HashMap would be harmful? I think it can be nice to not have to convert across types.

Similarly, in stdlib it will have these traits because

pub type RawFd = c::c_int;

perhaps we could do the same thing for Fixed?

/// Raw file descriptors.
#[cfg_attr(staged_api, stable(feature = "rust1", since = "1.0.0"))]
pub type RawFd = c::c_int;

andrewgazelka avatar Apr 28 '24 11:04 andrewgazelka

There's no harm in that

There's no harm in that.

Fixed is just an interface constraint

see https://github.com/tokio-rs/io-uring/blob/master/src/types.rs#L35

I can accept this PR, but I'm just reminding you that this is not how it is designed to be used. The type of io_uring::types should only be used when construct opcode.

quininer avatar Apr 29 '24 04:04 quininer

As this has not been merged in I am going to close this.

andrewgazelka avatar Oct 31 '24 00:10 andrewgazelka