Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: more derive traits for Fixed type #279

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

andrewgazelka
Copy link

No description provided.

@quininer
Copy link
Member

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

@andrewgazelka
Copy link
Author

andrewgazelka commented Apr 28, 2024

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;

@quininer
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants