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

Allows lifetime elision and removes casting #19

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

Allows lifetime elision and removes casting #19

wants to merge 1 commit into from

Conversation

lucasloisp
Copy link

Simple changes guided by clippy

@quadrupleslap
Copy link
Owner

The "add" looks good but are you sure the elision is equivalent? I put that in their to basically work as a mutex on the capturer.

@lucasloisp
Copy link
Author

To be honest I was guided by clippy to make that change. But, as seen on the rustonomicon,

"If there is exactly one input lifetime position (elided or not), that lifetime is assigned to all elided output lifetimes."

fn new(buf: &mut [u8]) -> BufWriter;                    // elided
fn new<'a>(buf: &'a mut [u8]) -> BufWriter<'a>```

@lucasloisp lucasloisp closed this Nov 29, 2018
@lucasloisp lucasloisp reopened this Nov 29, 2018
@lucasloisp
Copy link
Author

What I could try out is removing the 'b annotation on the output to ensure it is the same as the one on the Input (as it was originally)

@owenthewizard
Copy link

What's holding this from being merged?

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

3 participants