Repository navigation
Fix itertools count repr - #3824
Conversation
|
Feel free to ignore those Clippy failures. @youknowone likely missed them in #3817. |
|
In EDIT: Please don't add what I'm asking to a commit just yet — local results are just fine. |
|
please do not use |
| let step = format!("{}", self.step.clone()); | ||
| if step != "1" { |
There was a problem hiding this comment.
I expected comparing the value instead of comparing the result.
Do you know what's the original way?
There was a problem hiding this comment.
cpython is also comparing the value (https://github.com/python/cpython/blob/3.10/Modules/itertoolsmodule.c#L4305-L4310).
65f96a8 to
3f8eb24
Compare
| cur.push_str(", "); | ||
| cur.push_str(&step); | ||
| let cur = format!("{}", self.cur.read().clone().repr(vm)?); | ||
| let step = self.step.as_u32_mask().clone(); |
There was a problem hiding this comment.
| let step = self.step.as_u32_mask().clone(); | |
| let step = self.step.as_bigint(); |
|
After #3830 merged, the clippy error also will be passed. |
youknowone
left a comment
There was a problem hiding this comment.
Thank you for contributing!
No description provided.