-
Notifications
You must be signed in to change notification settings - Fork 27
Open
Description
Describe the bug
A recent commit to partner-chains-db-sync-data-sources broke the observed_async_trait macro. That macro relies on calling methods on McFollowerMetrics which were changed from pub to pub(crate).
To Reproduce
This test from the crate fails to compile, as long as you run it outside of the crate.
use async_trait::async_trait;
use partner_chains_db_sync_data_sources::McFollowerMetrics;
struct MetricsMacroTestStruct {
metrics_opt: Option<McFollowerMetrics>,
}
#[async_trait]
trait MetricMacroTestTrait {
async fn test_method_one(&self) -> Result<(), Infallible>;
async fn test_method_two(&self) -> Result<(), Infallible>;
}
observed_async_trait!(
impl MetricMacroTestTrait for MetricsMacroTestStruct {
async fn test_method_one(&self) -> Result<(), Infallible> {
tokio::time::sleep(core::time::Duration::from_millis(10)).await;
Ok(())
}
async fn test_method_two(&self) -> Result<(), Infallible> {
Ok(())
}
});Expected behavior
Either this code should compile or all the associated types should be deprecated.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels