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

Make rayon optional #13

Merged
merged 2 commits into from
Jul 8, 2018
Merged

Conversation

voidxnull
Copy link
Contributor

Added a par_iter feature and removed Sync bounds where they are not needed.
I also formatted the code with rustfmt, but can remove the commit if you think this is unnecessary.

Copy link
Owner

@saschagrunert saschagrunert left a comment

Choose a reason for hiding this comment

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

Thanks for contributing! Can you please adapt the CI too?

@@ -85,6 +87,7 @@ fn arenatree_iter() {
assert_eq!(node_refs, vec![&arena[a], &arena[b], &arena[c], &arena[d]]);
}

#[cfg(feature = "par_iter")]
Copy link
Owner

Choose a reason for hiding this comment

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

Can you please change the appveyor and travis config to also test with this feature?

src/lib.rs Outdated
arena
.nodes
.get_pair_mut(self.index, new_sibling.index, "Can not insert a node before itself");
let (self_borrow, new_sibling_borrow) = arena.nodes.get_pair_mut(
Copy link
Owner

Choose a reason for hiding this comment

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

I think the formatting is okay, I just formatted it with 120 chars per line in my rustfmt config.

@@ -17,8 +17,13 @@ appveyor = { repository = "saschagrunert/indextree", branch = "master", service

[features]
deser = [ "serde", "serde_derive" ]
par_iter = ["rayon"]
Copy link
Owner

Choose a reason for hiding this comment

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

Can you please add a build including this feature in the appveyor and travis config?

@voidxnull
Copy link
Contributor Author

Done. Removed the rustfmt commit and added the feature to the CI configs.

@saschagrunert saschagrunert merged commit ea038e8 into saschagrunert:master Jul 8, 2018
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.

None yet

2 participants