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

[move] Add do and range_do macros for u* #18187

Merged
merged 10 commits into from
Jun 11, 2024
Merged

Conversation

tnowacki
Copy link
Contributor

Description

  • Added do, do_eq, range_do, and range_do_eq macros for integer types

Test plan

  • Added tests

Release notes

Check each box that your changes affect. If none of the boxes relate to your changes, release notes aren't required.

For each box you select, include information after the relevant heading that describes the impact of your changes that a user might notice and any actions they must take to implement updates.

  • Protocol:
  • Nodes (Validators and Full nodes):
  • Indexer:
  • JSON-RPC:
  • GraphQL:
  • CLI:
  • Rust SDK:

@tnowacki tnowacki requested a review from a team June 11, 2024 02:56
Copy link

vercel bot commented Jun 11, 2024

@tnowacki is attempting to deploy a commit to the Mysten Labs Team on Vercel.

A member of the Team first needs to authorize it.

Copy link

vercel bot commented Jun 11, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
sui-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 11, 2024 9:44pm

Copy link
Contributor

@dariorussi dariorussi left a comment

Choose a reason for hiding this comment

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

looks good to me

let start = $start;
let stop = $stop;
let mut i = start;
// we check `i >= stop` inside the loop instead of `i <= stop` as `while` consition to avoid
Copy link
Contributor

Choose a reason for hiding this comment

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

typo: consition -> condition

public(package) macro fun range_do($start: _, $stop: _, $f: |_|) {
let start = $start;
let stop = $stop;
let mut i = start;
Copy link
Contributor

Choose a reason for hiding this comment

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

why not let mut i = $start?

@tnowacki tnowacki enabled auto-merge (squash) June 11, 2024 21:43
@tnowacki tnowacki merged commit 738c473 into MystenLabs:main Jun 11, 2024
39 of 43 checks passed
@tnowacki tnowacki deleted the numdo branch June 12, 2024 16:34
tx-tomcat pushed a commit to tx-tomcat/sui-network that referenced this pull request Jul 29, 2024
## Description 

- Added do, do_eq, range_do, and range_do_eq macros for integer types

## Test plan 

- Added tests

---

## Release notes

Check each box that your changes affect. If none of the boxes relate to
your changes, release notes aren't required.

For each box you select, include information after the relevant heading
that describes the impact of your changes that a user might notice and
any actions they must take to implement updates.

- [ ] Protocol: 
- [ ] Nodes (Validators and Full nodes): 
- [ ] Indexer: 
- [ ] JSON-RPC: 
- [ ] GraphQL: 
- [ ] CLI: 
- [ ] Rust SDK:
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