Closed Techcable closed 2 years ago
This fixes all the test failures for every possible feature combination, many of which wouldn't even compile before this change.
Fixing feature="nothreads" was especially hard, and required a relatively big refactoring (see below)
feature="nothreads"
Before this change, we had to use multiple trait definitions for every possible combination of std/no_std and threads/nothreads
This requires 4x as many trait definitions as default features.
As you can immaigne, we've been forgetting some of these :wink:
This fixes it by creating an internal utility module of maybe traits, which are automatically enabled/disabled depending on the features.
maybe
So Sync becomes maybe::Sync and UnwindSafe becomes maybe::UnwindSafe
Sync
maybe::Sync
UnwindSafe
maybe::UnwindSafe
This commit fixes the tests for feature="nothreads", and also no\_std + nothreads and probably a bunch of other bugs too.
no\_std + nothreads
Now we are able to support every possible feature combo without quadrupling trait defintiions ;)
So all the tests are fixed but I forgot one line of formatting 😆
Mmmm look at that beautiful green checkmark 😄
This fixes all the test failures for every possible feature combination, many of which wouldn't even compile before this change.
Fixing
feature="nothreads"
was especially hard, and required a relatively big refactoring (see below)Use a single trait definition for every possible feature combination
Before this change, we had to use multiple trait definitions for every possible combination of std/no_std and threads/nothreads
This requires 4x as many trait definitions as default features.
As you can immaigne, we've been forgetting some of these :wink:
This fixes it by creating an internal utility module of
maybe
traits, which are automatically enabled/disabled depending on the features.So
Sync
becomesmaybe::Sync
andUnwindSafe
becomesmaybe::UnwindSafe
This commit fixes the tests for feature="nothreads", and also
no\_std + nothreads
and probably a bunch of other bugs too.Now we are able to support every possible feature combo without quadrupling trait defintiions ;)