-
-
Notifications
You must be signed in to change notification settings - Fork 78
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
Update features heuristic to include more unstable and private feature name patterns #463
Conversation
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.
This looks good, just a couple of small nitpicks.
I've found that reading one's own code in the GitHub PR review interface makes it more likely to spot these kinds of little typos. We all get used to looking at our code changes in our local editor and the typos become invisible, so the change of scenery helps make them stand out.
I'd highly recommend trying it, since it would both increase your velocity and reduce the number of back-and-forth code review cycles before merging. I think you could have noticed all the things I pointed out in this review by yourself with one self-review like that.
src/rustdoc_gen.rs
Outdated
let prefix_ignored_by_default = vec![ | ||
String::from("_"), | ||
String::from("unstable-"), | ||
String::from("unstable_"), | ||
]; |
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.
Out of curiosity, do we need the String::from()
here and above? Would this code work if these were static &str
instead?
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.
Oh, it would! I'm cleaning it to be &str
instead.
src/rustdoc_gen.rs
Outdated
.map(|p| feature_name.starts_with(p)) | ||
.any(|f| f) |
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.
I think this is just .any(|p| feature_name.starts_with(p))
right?
Co-authored-by: Predrag Gruevski <2348618+obi1kenobi@users.noreply.github.com>
Co-authored-by: Predrag Gruevski <2348618+obi1kenobi@users.noreply.github.com>
Thank you for the review, I properly setup my editor, so I should not have that type of problem anymore :). Thank you again for all the tips, |
Ah, thank you for pointing me to the lint docs, I think I will try to do one lint to see how it goes! Thank you again for all mentoring around the project!! |
No worries, thanks for all the awesome contributions — it's my pleasure to help! |
Addresses #461, by adding
_
,unstable-
andunstable_
prefixes to ignore.