Skip to content
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

feat: Iterator::count #7094

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

MagisterDallis
Copy link
Contributor

Encountering a compilation panic on this one. I'm wondering if it's because of the unused closure argument?

@reviewable-StarkWare
Copy link

This change is Reviewable

Copy link
Collaborator

@orizi orizi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are you based over latest? there was a fix for something similar merged lately.

Reviewed all commit messages.
Reviewable status: 0 of 2 files reviewed, all discussions resolved

Copy link
Contributor Author

@MagisterDallis MagisterDallis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, this is based on 3e611b5

Reviewable status: 0 of 2 files reviewed, all discussions resolved (waiting on @orizi)

Copy link
Collaborator

@orizi orizi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 0 of 2 files reviewed, 1 unresolved discussion (waiting on @MagisterDallis)


corelib/src/iter/traits/iterator.cairo line 80 at r1 (raw file):

    ) -> usize {
        let mut self = self;
        Self::fold(ref self, 0_usize, |count, _x| {

can you try removing anything that would need to be inferred?

(specifically - i highly suspect Self::Item of being the culprit of this not working)

Suggestion:

        Self::fold::<usize>(ref self, 0_usize, |count: usize, _x: Self::Item| {

Copy link
Contributor Author

@MagisterDallis MagisterDallis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 0 of 2 files reviewed, 1 unresolved discussion (waiting on @orizi)


corelib/src/iter/traits/iterator.cairo line 80 at r1 (raw file):

Previously, orizi wrote…

can you try removing anything that would need to be inferred?

(specifically - i highly suspect Self::Item of being the culprit of this not working)

Even with explicit types, this still happens.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants