-
Notifications
You must be signed in to change notification settings - Fork 53
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
Conversation
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.
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")] |
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.
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( |
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.
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"] |
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.
Can you please add a build including this feature in the appveyor and travis config?
Done. Removed the rustfmt commit and added the feature to the CI configs. |
Added a
par_iter
feature and removedSync
bounds where they are not needed.I also formatted the code with rustfmt, but can remove the commit if you think this is unnecessary.