Closed bbqsrc closed 3 years ago
Great, thank you! Can you also add a static test to make sure it remains Sync
in the future?
Something like:
#[test]
fn is_send_sync() {
fn check<T: Send + Sync>(_: Option<T>) {}
check::<Tripwire>(None);
}
For static assertions I tend to use the lightweight static_assertions
crate. Committed with that for now, but if you do not want this dependency, I can revert it and create the precise test you suggested, I just find that the assert macro mechanism is more thorough and declares the contract more obviously in the code.
Merging #13 (e5371e4) into master (979300b) will not change coverage. The diff coverage is
n/a
.
@@ Coverage Diff @@
## master #13 +/- ##
=======================================
Coverage 81.21% 81.21%
=======================================
Files 3 3
Lines 165 165
=======================================
Hits 134 134
Misses 31 31
Impacted Files | Coverage Δ | |
---|---|---|
src/combinator.rs | 75.00% <ø> (ø) |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 979300b...e5371e4. Read the comment docs.
As an aside, there's no need to force-push. I can always squash when I eventually merge, or we can do one final rebase at th eend. Force-pushes makes it much harder to see what changed over time, and are rendered horribly on GitHub :sweat_smile:
The force push was because I rebased on master as a courtesy to make the final squash merge easier, haha.
Released in 0.8.1 :tada:
Re-adds
Sync
to Tripwire and friends.