refactored code to use const_ft #301
No reviewers
Labels
No labels
breaking
bug
dependencies
good first issue
help wanted
unstable
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
gh-uuid-rs/uuid!301
Loading…
Reference in a new issue
No description provided.
Delete branch "refactor/const-ft"
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(n) refactor
Description
Adds const_ft(0.1.2) as a dependency
Refactors code to use the dependency
Motivation
Code looks cleaner and avoids const(feature) & const(not-feature) repetition
Tests
All tests pass, none added
unused function
github.com/uuid-rs/uuid@d347d0638f/src/parser/mod.rs (L115-L120)This comment was generated by todo based on a
TODOcomment ind347d0638fin #301. cc @uuid-rs.Hmm, I think we should be really mindful about introducing new dependencies. Do we need to use an external crate for const functions? Using a macro seems nice, but it could easily just live here in
uuid.As there some problems with the macro in itself, I think its best to not depend on it either way until they are polished out
@kodrAus it doesn't make much of a difference since it's my own crate. Though currently there are some issues with the macro so might postpone this
@Dylan-DPC there are a few differences worth considering. The first is compile times where additional dependencies mean more units of compilation, more metadata, more network, so they'll regress slightly. The second is in mental overhead, where there's an additional non-local piece of infrastructure new contributors need to understand in order to contribute.
I'm not suggesting those are hard blockers, but we should definitely consider them.
@KodrAus I understand your point and it was a reason why i wasn't so keen on
cfg_if. One of the main reasons of creating a new crate is that it wasn't related to uuids and can be something of greater use to other projects as well.Turns out there is still some more stuff to be done with the macros so closing the PR now and we can reconsider it later.
Pull request closed