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

Struct Point conversion to tuple #47

Merged
merged 1 commit into from
Oct 13, 2023
Merged

Conversation

mrghosti3
Copy link
Contributor

Added tuple conversion for struct Point for one liner extraction of its inner data by introducing method "tuple".

This change is just for convenience to downstream user in getting coordinates like the examples below:

let (x, _, z) = p.tuple();
let (_, y, z) = p.tuple();
let (x, y, _) = p.tuple();

Added tuple conversion for struct Point for one liner extraction of its
inner data by introducing method "tuple".

This change is just for convenience to downstream user in getting
coordinates like the examples below:

```rust
let (x, _, z) = p.tuple();
let (_, y, z) = p.tuple();
let (x, y, _) = p.tuple();
```
@mrghosti3
Copy link
Contributor Author

Rebased onto main branch.

@brettfo brettfo merged commit f7ce4e4 into ixmilia:main Oct 13, 2023
8 checks passed
@mrghosti3 mrghosti3 deleted the point-to-tuple branch October 16, 2023 08:43
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