From b8797a9208cf371579689bf8d558cf8217981e4a Mon Sep 17 00:00:00 2001 From: Antonio Ventilii Date: Wed, 9 Sep 2026 11:24:37 +0200 Subject: [PATCH] chore(backend): return a ready future from the composite exchange test mock Rust 1.98 adds clippy::unused_async_trait_impl, which fires on an async trait impl with no .await in its body. With -D warnings this fails the backend lint job. --- src/backend/src/exchange/composite.rs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/backend/src/exchange/composite.rs b/src/backend/src/exchange/composite.rs index 95c6a668278..6ff37bf1bb6 100644 --- a/src/backend/src/exchange/composite.rs +++ b/src/backend/src/exchange/composite.rs @@ -88,7 +88,11 @@ pub(crate) async fn fetch_all_prices( #[cfg(test)] mod tests { - use std::{cell::RefCell, rc::Rc}; + use std::{ + cell::RefCell, + future::{ready, Future}, + rc::Rc, + }; use candid::Principal; use futures::executor::block_on; @@ -106,11 +110,11 @@ mod tests { } impl ExchangePriceProvider for MockPrimaryProvider { - async fn fetch_prices( + fn fetch_prices( &self, _token_ids: &[StoredTokenId], - ) -> Result, String> { - self.result.clone() + ) -> impl Future, String>> { + ready(self.result.clone()) } }