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

Added append_array to Array #4260

Merged
merged 1 commit into from
Oct 16, 2023
Merged

Added append_array to Array #4260

merged 1 commit into from
Oct 16, 2023

Conversation

yuvalsw
Copy link
Contributor

@yuvalsw yuvalsw commented Oct 15, 2023

This change is Reviewable

@yuvalsw yuvalsw requested a review from orizi October 15, 2023 15:40
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.

Reviewed 2 of 2 files at r1.
Reviewable status: all files reviewed (commit messages unreviewed), 1 unresolved discussion (waiting on @yuvalsw)


corelib/src/array.cairo line 47 at r1 (raw file):

            };
        };
    }

Suggestion:

    fn append_span<+Clone<T>, +Drop<T>>(ref self: Array<T>, mut span: Span<T>) {
        match span.pop_front() {
            Option::Some(current) => {
                self.append(current.clone());
                self.append_span(span);
            },
            Option::None => {}
        };
    }

@yuvalsw yuvalsw force-pushed the yuval/append_array branch from f227e86 to eea9dd2 Compare October 16, 2023 10:32
Copy link
Contributor Author

@yuvalsw yuvalsw 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 3 files reviewed, 1 unresolved discussion (waiting on @orizi)


corelib/src/array.cairo line 47 at r1 (raw file):

            };
        };
    }

Done.

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.

:lgtm:

Reviewed 3 of 3 files at r2, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @yuvalsw)

@yuvalsw yuvalsw force-pushed the yuval/append_array branch from eea9dd2 to 0868204 Compare October 16, 2023 14:13
@yuvalsw yuvalsw enabled auto-merge October 16, 2023 14:13
@yuvalsw yuvalsw force-pushed the yuval/append_array branch from 0868204 to 116a7ea Compare October 16, 2023 19:33
@yuvalsw yuvalsw added this pull request to the merge queue Oct 16, 2023
Merged via the queue into main with commit cf1c250 Oct 16, 2023
@orizi orizi deleted the yuval/append_array branch November 6, 2023 07:03
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.

2 participants