style: apply rustfmt across all crates and demos
Consistent formatting pass: line wrapping, import sorting, trailing whitespace removal, let-chain indentation, merged derive attributes, and unsafe block reformatting. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
This commit is contained in:
@@ -182,13 +182,14 @@ pub fn select_backend() -> Result<Box<dyn GpuBackend>> {
|
||||
{
|
||||
if devices.iter().any(|d| d.is_metal())
|
||||
&& let Ok(backend) = metal::MetalBackend::new()
|
||||
&& backend.is_available() {
|
||||
tracing::info!(
|
||||
"Using Metal GPU backend (rtx-tensor): {}",
|
||||
backend.device_info().name
|
||||
);
|
||||
return Ok(Box::new(backend));
|
||||
}
|
||||
&& backend.is_available()
|
||||
{
|
||||
tracing::info!(
|
||||
"Using Metal GPU backend (rtx-tensor): {}",
|
||||
backend.device_info().name
|
||||
);
|
||||
return Ok(Box::new(backend));
|
||||
}
|
||||
}
|
||||
|
||||
// Return CPU fallback
|
||||
|
||||
Reference in New Issue
Block a user