Rename SoftBufferError to SwBufError
This commit is contained in:
parent
33fe3ae3c7
commit
95e8d05902
8 changed files with 25 additions and 25 deletions
|
|
@ -3,7 +3,7 @@ use raw_window_handle::{HasRawWindowHandle, RawDisplayHandle, RawWindowHandle};
|
|||
use thiserror::Error;
|
||||
|
||||
#[derive(Error, Debug)]
|
||||
pub enum SoftBufferError<W: HasRawWindowHandle> {
|
||||
pub enum SwBufError<W: HasRawWindowHandle> {
|
||||
#[error(
|
||||
"The provided window returned an unsupported platform: {human_readable_window_platform_name}, {human_readable_display_platform_name}."
|
||||
)]
|
||||
|
|
@ -19,9 +19,9 @@ pub enum SoftBufferError<W: HasRawWindowHandle> {
|
|||
}
|
||||
|
||||
#[allow(unused)] // This isn't used on all platforms
|
||||
pub(crate) fn unwrap<T, E: std::error::Error + 'static, W: HasRawWindowHandle>(res: Result<T, E>, str: &str) -> Result<T, SoftBufferError<W>>{
|
||||
pub(crate) fn unwrap<T, E: std::error::Error + 'static, W: HasRawWindowHandle>(res: Result<T, E>, str: &str) -> Result<T, SwBufError<W>>{
|
||||
match res{
|
||||
Ok(t) => Ok(t),
|
||||
Err(e) => Err(SoftBufferError::PlatformError(Some(str.into()), Some(Box::new(e))))
|
||||
Err(e) => Err(SwBufError::PlatformError(Some(str.into()), Some(Box::new(e))))
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue