-
Notifications
You must be signed in to change notification settings - Fork 25
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
swap source adopter code #145
base: main
Are you sure you want to change the base?
Conversation
operations.pop(); | ||
// if it is not empty, we fill the other left operations. | ||
if !operations.is_empty() { | ||
hops.extend(operations.into_iter().map(|op| Hop { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't this make the hops vector have the first hop twice? Since the first_hop is added at initialization of hops and then his extended here ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@NotJeremyLiu I also had some confusions releted to this so could you help me understand and what would be the better approach or current one is fine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure, I imagine it's not including the first operation when you initialize the vector. You can write tests to verify it works as you want it to.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@NotJeremyLiu we have checked we skipped the first operations then it is not working as expected and the hops vector does not have first hop twice so please check and let us know if any things else is required as we have executed test cases and they are working fine
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
left some comments, great work, once comments are responded to/address please ask for a re-review
We have taken refreance from baby swap adopter , please review and let us know if anythings need to change.