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

some clippy clean ups #81

Open
wants to merge 1 commit into
base: master
from
Open

some clippy clean ups #81

wants to merge 1 commit into from

Conversation

@ahmed-masud
Copy link

ahmed-masud commented Jun 28, 2020

No description provided.

Copy link
Collaborator

ogoffart left a comment

Thanks for the change. Please see comments.

@@ -5,7 +5,7 @@ use std::fs::File;
use std::io::Read;
use std::mem::swap;
use std::path::{Path, PathBuf};
use syn;
// use syn;

This comment has been minimized.

@ogoffart

ogoffart Jun 29, 2020

Collaborator

please remove this line

@@ -31,7 +31,7 @@ impl<'a> Cursor<'a> {
+ self.rest[..amt]
.char_indices()
.filter(|&(_, ref x)| *x == '\n')
.map(|(i, _)| column_start = Some(i))
.filter(|(i, _)| { column_start = Some(*i); true } )

This comment has been minimized.

@ogoffart

ogoffart Jun 29, 2020

Collaborator

That's strange. I prefered how the code looked before. What's the rationale here? Is it because clippy complains that this should be a filrer_map? I guess then the warning should be ignored because filter does not make sense here.

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

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.