-
Notifications
You must be signed in to change notification settings - Fork 673
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
Add AioCb::from_boxed_slice #582
Conversation
src/sys/aio.rs
Outdated
/// Keeps a reference to a Boxed slice | ||
boxed(Rc<Box<[u8]>>), | ||
/// Keeps a reference to a slice | ||
phantom(PhantomData<&'a mut [u8]>) |
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.
nit: Indentation on this block seems off
One super minor nit, but otherwise the change looks good to me. |
good catch. I'll fix it and merge. |
bors r+ |
Merge conflict |
☔ The latest upstream changes (presumably 8c47de4) made this pull request unmergeable. Please resolve the merge conflicts. |
The existing AioCb constructors work for simple programs where everything is stored on the stack. But in more complicated programs the borrow checker can't prove that a buffer will outlive the AioCb that references it. Fix this problem by introducting AioCb::from_boxed_slice, which takes a reference-counted buffer. Fixes nix-rust#575
bors +r |
bors r+ |
582: Add AioCb::from_boxed_slice r=posborne The existing AioCb constructors work for simple programs where everything is stored on the stack. But in more complicated programs the borrow checker can't prove that a buffer will outlive the AioCb that references it. Fix this problem by introducting AioCb::from_boxed_slice, which takes a reference-counted buffer. Fixes #575
thanks @posborne . I obviously need to work on my bors-foo. |
Build succeeded |
The existing AioCb constructors work for simple programs where
everything is stored on the stack. But in more complicated programs the
borrow checker can't prove that a buffer will outlive the AioCb that
references it. Fix this problem by introducting
AioCb::from_boxed_slice, which takes a reference-counted buffer.
Fixes #575