-
Notifications
You must be signed in to change notification settings - Fork 185
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
fix nightly build issues with as_ref() #219
Conversation
We don't want to if line.as_ref().is_empty()
|| (self.ignore_space
&& line
.as_ref()
.chars()
.next()
.map_or(true, char::is_whitespace))
{
return false;
}
if self.ignore_dups {
if let Some(s) = self.entries.back() {
if s == line.as_ref() {
return false;
}
}
} |
That's fine,, please check my latest commit |
Darn, it "worked on my machine", I'll investigate the failures |
Nearly there, it's currently the example that's failing. Struggling to repro as I don't have the |
so we can print reference and consume line
@gwenn is the current solution acceptable? |
I hope/guess you will consider #218 to be better. |
Yes, I just saw it, and I'll close this. Will you be able to release a |
Do you mind if a |
Either one, I haven't used |
fixes #217
I spent part of the day trying to see what change to Rust introduced this issue, but came blank.
I've replacedFound a better fix of passing astring.as_ref()
with a clone, which fixes the issue. Ifclone
is a problem, we could resolve this later (though I was able to fix the error in a different way which was a bit longer).&str
, and annotating it as such where necessary.cc @gwenn