Feature: async trait
#11
Sapludināts
igalic
sapludināja 8 revīzijas no plume/webfinger:feat/async-trait
uz main
pirms 4 gadiem
Notiek ielāde…
Atsaukties uz šo jaunā problēmā
Vēl nav satura.
Dzēst atzaru 'plume/webfinger:feat/async-trait'
Atzara dzēšana ir neatgriezeniska, kā arī tā ir NEATGRIEZENISKA. Vai turpināt?
add a feature (behind a off-by-default flag) to use async trait implementations.
for now, this doesn't work, because
impl String
is not (necessarily)Send
safe.current status:
Codecov Report
86.45% <81.25%> (-1.43%)
97.54% <98.50%> (+3.42%)
100.00% <100.00%> (ø)
100.00% <100.00%> (ø)
Continue to review full report at Codecov.
back to building, now we need to add a test for async.
This: https://gist.github.com/a5727727c2f55be6f37e937bfc232d32 is not it: https://gist.github.com/ae41ec328a2a443fa02214a4b0f19281
LGTM
I feel like test_my_resolver/test_my_async_resolver are more coverage oriented than correctness : the valid answer is barely validated, however this is unrelated to this pr
@ -0,0 +9,4 @@
pub trait AsyncResolver {
type Repo: Send;
/// Returns the domain name of the current instance.
async fn instance_domain<'a>(&self) -> &'a str;
I'm not sure this requires to be async, I would expect an implementation to return one of its fields, but I guess there is nothing wrong with too much async, it'll just get optimized away during monomorphisation
@ -0,0 +9,4 @@
pub trait AsyncResolver {
type Repo: Send;
/// Returns the domain name of the current instance.
async fn instance_domain<'a>(&self) -> &'a str;
and if it's
async
in the trait signature, it means you can useawait
in the function body.how do you suggest improving those?
ideally, i'd like to do that before a next release, because, more importantly, i'd like to call the next release '1.0'
hum, endpoint() rely way more on find() than I though so in fact any incorrectness on a valid answer would come from find(), never mind my comment
Recenzenti
4e8f12810c
.Solis 1:
Projekta repozitorijā izveidojiet jaunu jaunu atzaru un pārbaudiet savas izmaiņas.Solis 2:
Sapludināt izmaiņas un atjaunot tās Forgejo.