-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Fix some clippy lints #138
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
Changes from 9 commits
5db663d
d493a44
4e8ea94
2268a2f
2ae9dfa
bc774fe
fc8024d
a5da770
6dd3fa6
0857c22
dc9ce8f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -63,7 +63,7 @@ impl FnScopes { | |
.syntax() | ||
.descendants() | ||
.filter_map(ast::BindPat::cast) | ||
.filter_map(ScopeEntry::new); | ||
.filter_map(ScopeEntry::new_opt); | ||
self.scopes[scope].entries.extend(entries); | ||
} | ||
fn add_params_bindings(&mut self, scope: ScopeId, params: Option<ast::ParamList>) { | ||
|
@@ -88,7 +88,7 @@ pub struct ScopeEntry { | |
} | ||
|
||
impl ScopeEntry { | ||
fn new(pat: ast::BindPat) -> Option<ScopeEntry> { | ||
fn new_opt(pat: ast::BindPat) -> Option<ScopeEntry> { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's use https://doc.rust-lang.org/std/ffi/struct.CString.html#method.new There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Looks like this will be fixed with rust-lang/rust-clippy#3338 |
||
if pat.name().is_some() { | ||
Some(ScopeEntry { | ||
syntax: pat.syntax().owned(), | ||
|
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.
Agree that
new
probably isn't the best name here, the wholeJobHandle
infra will be removed once we finish migration to salsa.