Use cfg-if to create logical feature gate implementations #167
No reviewers
Labels
No labels
breaking
bug
dependencies
good first issue
help wanted
unstable
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
gh-uuid-rs/uuid!167
Loading…
Reference in a new issue
No description provided.
Delete branch "cfg_if"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I'm submitting a ...
Description
uuidnow addscfg-ifas a dependency. With this,#[cfg(..)]implementations are easier to understand, as they can be handled in a more logical view because the macro allows us toifstatements to make the checks more rustic at the source levelMotivation
Understanding feature gate implementation becomes easier.
Tests
The CI builds passing should be plenty.
Related Issue(s)
#147
question: should I put various feature gated constructor
newfunctions behind cfg_if` macros aswell or should we wait until a bigger refactor comes along?@uuid-rs/uuid I think this is logical enough for this PR. Should be ready for review and merge
This looks a lot easier to follow! Just had a quick scan through on mobile
@ -146,0 +173,4 @@mod serde_support;}}Maybe we could reduce some duplicated nesting here by conditionally using
core as std:What do you think?
@ -146,0 +173,4 @@mod serde_support;}}This PR was intended to switch to
cfg_if. Another PR should make the that part more readable later... which I think I will have ready soonbors: r+
Build failed
clippy was outdated, cache cleared
bors r+
Build failed
again! wrong cache cleared :(
bors r+
Build succeeded