| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
Matching classes causes a stack underflow, no clue why. That's for a different pr though. |
Sorry, something went wrong.
There was a problem hiding this comment.
lgtm! lmk when you feel it's ready to be merged.
Sorry, something went wrong.
| match n { | ||
| // If no name is provided, simply pop the top of the stack. | ||
| None => { | ||
| emit!(self, Instruction::Pop); | ||
| Ok(()) | ||
| } |
There was a problem hiding this comment.
You could also use let-else, to prevent rightward drift.
let Some(name) = n else {
// If no name is provided, simply pop the top of the stack.
emit!(self, Instruction::Pop);
return Ok(());
};
Sorry, something went wrong.
| @@ -2155,10 +2158,7 @@ impl Compiler<'_> { | |||
| for ident in attrs.iter().take(n_attrs).skip(i + 1) { | |||
There was a problem hiding this comment.
I know this isn't the code you changed, but if you're looking to make it more rusty, you could use .enumerate() here for the outer loop (for (i, attr) in attrs.iter().enumerate()) and then just for ident in &attrs[i + 1..] for the inner loop.
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
#5628 was a little chaotic.