rt tests: the import tests' release is crate::memory::Release, which clippy's type_complexity takes
c80eae3e98's check (m3-max-49028) passed everything but clippy under --cfg m2v_gpu and m2v_cpu_icd: releasing() returned (Option<Box<dyn FnOnce() + Send>>, Arc<AtomicBool>), a type clippy::type_complexity refuses. The crate's own alias for that box names it. Verified: nothing yet; the next check job follows. The device legs run on c80eae3e98's archives, whose test code differs from this commit's only in the alias.
This commit is contained in:
1 parent
92578bb1e4
commit
d29a50fbcb
1 file changed
+3
-2
@@ -57,6 +57,7 @@ fn host_memory_takes_the_first_coherent_listed_type_offered() {
|
||||
/// On unix, where the tests map host memory themselves.
|
||||
#[cfg(all(unix, any(m2v_gpu, m2v_cpu_icd)))]
|
||||
mod on_device {
|
||||
use crate::memory::Release;
|
||||
use crate::tests::command::on_device::{each_device, finished};
|
||||
use crate::tests::devices_of_the_cfgs_kind;
|
||||
use crate::{Device, DeviceOptions, Error, ImportHandle, Limit, MemoryClass};
|
||||
@@ -111,10 +112,10 @@ mod on_device {
|
||||
}
|
||||
|
||||
/// A release that sets a flag, and the flag.
|
||||
fn releasing() -> (Option<Box<dyn FnOnce() + Send>>, Arc<AtomicBool>) {
|
||||
fn releasing() -> (Option<Release>, Arc<AtomicBool>) {
|
||||
let ran = Arc::new(AtomicBool::new(false));
|
||||
let set = Arc::clone(&ran);
|
||||
let release: Box<dyn FnOnce() + Send> = Box::new(move || set.store(true, Ordering::SeqCst));
|
||||
let release: Release = Box::new(move || set.store(true, Ordering::SeqCst));
|
||||
(Some(release), ran)
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user