Closed DmitrySamoylov closed 1 year ago
Agreed, #[allow]
would be better. But I don't get how we cannot change codegen. #[allow]
should be added by codegen?
Right, I just meant not complicate it with extra branches.
I think the is_empty would be better for the case with < 1
. Isn't is possible that that method could be implemented in a more efficient manner than the .len()
method?
Since this was sitting in my notifications for forever, I just had a look. Seems like this is just a specific case of 1 for an otherwise generic check, and as such I don't think we should change the codegen. We can probably just add an
#[allow]
to that section of the code.