(&self, f: &mut std::fmt::Formatter<'_>)
| 28 | |
| 29 | impl Display for WgpuContextError { |
| 30 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { |
| 31 | match self { |
| 32 | Self::NoCompatibleDevice => writeln!(f, "Couldn't find suitable device"), |
| 33 | Self::WgpuCreateSurfaceError(inner) => { |
| 34 | writeln!(f, "Couldn't create wgpu surface")?; |
| 35 | inner.fmt(f) |
| 36 | } |
| 37 | Self::UnsupportedSurfaceFormat => { |
| 38 | writeln!( |
| 39 | f, |
| 40 | "Couldn't find `Rgba8Unorm` or `Bgra8Unorm` texture formats for surface" |
| 41 | ) |
| 42 | } |
| 43 | Self::RequestAdapterError(inner) => { |
| 44 | writeln!(f, "Couldn't request an adapter: {:#}", inner) |
| 45 | } |
| 46 | Self::RequestDeviceError(inner) => { |
| 47 | writeln!(f, "Couldn't request a device: {:#}", inner) |
| 48 | } |
| 49 | Self::PollError(inner) => { |
| 50 | writeln!(f, "Couldn't poll a device: {:#}", inner) |
| 51 | } |
| 52 | } |
| 53 | } |
| 54 | } |
| 55 | |
| 56 | impl Error for WgpuContextError {} |
nothing calls this directly
no outgoing calls
no test coverage detected