40 Commits

Author SHA1 Message Date
Sosthène Guédon
4c86dfdb87 Add "The Trussed developers" to the author field 0.3.0 2023-02-01 14:30:07 +01:00
Sosthène Guédon
9d932d9222 Prepare release 0.3.0 2023-02-01 14:30:07 +01:00
Sosthène Guédon
a4532e337e Add tests with InterchangeRef 2023-01-31 17:08:53 +01:00
Sosthène Guédon
2eb171970f Add const-erased interchange reference 2023-01-31 17:08:53 +01:00
Sosthène Guédon
60c465683b Remove unnecessary unsafe 2023-01-31 17:08:53 +01:00
Sosthène Guédon
f5fb6d5848 Replace Q and A with Rq and Rp 2023-01-31 17:08:53 +01:00
Sosthène Guédon
2fd0600461 Fix too strict ordering of last_claimed increment 2023-01-31 17:08:53 +01:00
Sosthène Guédon
437091916f Fix name typo 2023-01-31 17:08:53 +01:00
Sosthène Guédon
cc2b153daf Remove the Clone bound 2023-01-31 17:08:53 +01:00
Sosthène Guédon
62e2764277 Remove unlcaimed_clients
This method doesn't make sense now with RAII
2023-01-31 17:08:53 +01:00
Sosthène Guédon
4485400b00 Update changelog 2023-01-31 17:08:53 +01:00
Sosthène Guédon
34701deb9f Add const constructor to interchange
Thanks https://old.reddit.com/r/rust/comments/wwsddr/const_fn_parameter_usage_propagation_throws_errors/ilndzec/
2023-01-31 17:08:53 +01:00
Sosthène Guédon
c57c586ea4 Remove the macro.rs file 2023-01-31 17:08:53 +01:00
Sosthène Guédon
c9b54c9582 Improve documentation for interchange! macro 2023-01-31 17:08:53 +01:00
Sosthène Guédon
0e7108a0ad Use RAII to remove the need for reset_claims 2023-01-31 17:08:53 +01:00
Sosthène Guédon
a82ae57426 Improve naming consistency 2023-01-31 17:08:53 +01:00
Sosthène Guédon
28e5577a87 Use reference to channel directly in responder 2023-01-31 17:08:53 +01:00
Sosthène Guédon
07de0e8b20 Use const instead of macros
This is pretty much a complete rewrite. It gives a much nicer API to
understand from the documentation. It also means that it doesn't rely on
\#[doc(hidden)] methods (except for `Interchange::const_new` so that it
can be removed once the required compiler features are stabilized)

Because everything doesn't need to be `'static` anymore, it can also be
tested efficiently with Loom, ensuring that there are no possible race
conditions.

It is a significantly breaking change
2023-01-31 17:08:53 +01:00
Sosthène Guédon
8c986d8457 Reduce use of unsafe and satic mut
This does not change any behavior but avoids large `unsafe` blocks that are not necessary
2023-01-09 22:00:21 +01:00
Sosthène Guédon
fe56334666 Impl Sync for Requester and Responder 2022-10-04 20:15:32 +02:00
Robin Krahl
5c6a584b50 ci: Only deploy docs if on the main branch 2022-08-23 17:44:50 +02:00
Nicolas Stalder
46bf22ccb7 Add CHANGELOG and bump version 0.2.2 2022-08-22 13:10:47 +02:00
Sosthène Guédon
31f162df18 Create 2 interchanges in tests
This avoids introducing bugs by removing intermediary consts. For
example [Interchange::None; 1] compiles but not [Interchange::None; 2]
2022-08-22 13:10:47 +02:00
Sosthène Guédon
d7a4ff3af2 Fix UnsafeCell usage
The previous method created 2 mutable references to the same memory and
was therefore undefined behavior
2022-08-22 13:10:47 +02:00
Sosthène Guédon
85324d9602 Fix clippy warning 2022-08-22 12:59:20 +02:00