Changed enumerate_adapters to be able to work with custom backends (#8230)

Co-authored-by: Andreas Reich <r_andreas2@web.de>
This commit is contained in:
Robin CramerandAndreas Reich authored and GitHub committed 2025-10-06 19:27:23 +00:00
1 parent 1072b87894
commit 4652ea4189
12 files changed
+86 -33

No files matched your search

+2 -2
View File
@@ -122,7 +122,7 @@ pub async fn initialize_adapter(
cfg_if::cfg_if! {
if #[cfg(not(target_arch = "wasm32"))] {
let adapter_iter = instance.enumerate_adapters(backends);
let adapter_iter = instance.enumerate_adapters(backends).await;
let adapter = adapter_iter.into_iter()
// If we have a report, we only want to match the adapter with the same info.
//
@@ -136,7 +136,7 @@ pub async fn initialize_adapter(
panic!(
"Could not find adapter with info {:#?} in {:#?}",
adapter_report.map(|r| &r.info),
instance.enumerate_adapters(backends).into_iter().map(|a| a.get_info()).collect::<Vec<_>>(),
instance.enumerate_adapters(backends).await.into_iter().map(|a| a.get_info()).collect::<Vec<_>>(),
);
};
} else {