File tree Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -412,13 +412,13 @@ impl Surface {
412412 & self ,
413413 adapter : & hal:: DynExposedAdapter ,
414414 ) -> Result < hal:: SurfaceCapabilities , GetSurfaceSupportError > {
415- let backend = adapter. backend ( ) ;
416415 let suf = self
417- . raw ( backend)
418- . ok_or ( GetSurfaceSupportError :: NotSupportedByBackend ( backend ) ) ?;
416+ . raw ( adapter . backend ( ) )
417+ . ok_or ( GetSurfaceSupportError :: Unsupported ) ?;
419418 profiling:: scope!( "surface_capabilities" ) ;
420419 let caps = unsafe { adapter. adapter . surface_capabilities ( suf) }
421- . ok_or ( GetSurfaceSupportError :: FailedToRetrieveSurfaceCapabilitiesForAdapter ) ?;
420+ . ok_or ( GetSurfaceSupportError :: Unsupported ) ?;
421+
422422 Ok ( caps)
423423 }
424424
@@ -649,10 +649,8 @@ crate::impl_storage_item!(Adapter);
649649#[ derive( Clone , Debug , Error ) ]
650650#[ non_exhaustive]
651651pub enum GetSurfaceSupportError {
652- #[ error( "Surface is not supported for the specified backend {0}" ) ]
653- NotSupportedByBackend ( Backend ) ,
654- #[ error( "Failed to retrieve surface capabilities for the specified adapter." ) ]
655- FailedToRetrieveSurfaceCapabilitiesForAdapter ,
652+ #[ error( "Surface is not supported by the adapter" ) ]
653+ Unsupported ,
656654}
657655
658656#[ derive( Clone , Debug , Error ) ]
You can’t perform that action at this time.
0 commit comments