-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Clean up Some Clippy Warnings #478
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
Conversation
…stead of using explicit iteration methods
Thanks! |
crates/backend/src/ast.rs
Outdated
@@ -39,7 +39,7 @@ pub struct Import { | |||
|
|||
#[cfg_attr(feature = "extra-traits", derive(Debug, PartialEq, Eq))] | |||
pub enum ImportKind { | |||
Function(ImportFunction), | |||
Function(Box<ImportFunction>), |
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.
We aren't really going for speed here, could this be left as is to keep it consistent ?
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.
👍
crates/backend/src/codegen.rs
Outdated
@@ -31,19 +31,19 @@ fn to_ident_name(s: &str) -> Cow<str> { | |||
impl ToTokens for ast::Program { | |||
// Generate wrappers for all the items that we've found | |||
fn to_tokens(&self, tokens: &mut TokenStream) { | |||
for export in self.exports.iter() { |
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 personally prefer the previous way this was written, could it stay as it was?
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 PR cleans up some Clippy warnings