Use cfg_aliases to reduce boilerplate#2644
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2644 +/- ##
==========================================
- Coverage 74.18% 73.94% -0.24%
==========================================
Files 71 72 +1
Lines 40505 41457 +952
==========================================
+ Hits 30049 30657 +608
- Misses 10456 10800 +344 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
#2581 has 4 more places that would benefit from this patch. |
41782cd to
8275713
Compare
|
The codecov issue is related to codecov/codecov-action#1940 |
640ece9 to
671ccc0
Compare
Merging this PR will not alter performance
Comparing Footnotes
|
| "oss" => self.oss.clone().map(CacheType::OSS).ok_or_else(|| { | ||
| anyhow!("OSS cache not configured but specified in levels") | ||
| })?, | ||
| "disk" => { |
There was a problem hiding this comment.
This block didn't have cos case.
Having a single point of global features gate and cache type addresses it
|
Hey dear @sylvestre Do you think it's worth merging? I feel it would improve the codebase by consolidating all feature-related stuff in a dedicated place. |
cfg_aliases allows to define a long
any(feature = "",....)only once and then reuse it.