-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Remove wrapper functions from c.rs #128092
Conversation
apccontext: *mut c_void, | ||
iostatusblock: &mut IO_STATUS_BLOCK, | ||
buffer: *mut crate::mem::MaybeUninit<u8>, | ||
apccontext: *const core::ffi::c_void, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add core::ffi
to the module imports here?
byteoffset: Option<&i64>, | ||
key: Option<&u32> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these lifetimes would have been very useful if the thing we returned also had a lifetime... unfortunately...
You can address the diff in a followup since there's preexisting @bors r+ rollup |
I'd like for the windows
c.rs
just to contain the basic platform definitions and not anything higher level unless absolutely necessary. So this removes some wrapper functions that weren't really necessary in any case. The functions are only used in a few places which themselves are relatively thin wrappers. The "interesting" bit is that we had anAlertableIoFn
that abstracted overReadFileEx
andWriteFileEx
. I've replaced this with a closure.Also I removed an
#[allow(unsafe_op_in_unsafe_fn)]
while I was moving things around.