use crate::error::Error;
use std::fmt;
#[derive(Debug, Eq, PartialEq)]
pub struct CreateTextureError(Error);
impl CreateTextureError {
pub fn from_code(code: i32) -> Self {
Self(Error::from_code(code))
}
}
impl From<Error> for CreateTextureError {
fn from(value: Error) -> Self {
Self(value)
}
}
impl fmt::Display for CreateTextureError {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
fmt::Display::fmt(&self.0, f)
}
}
impl std::error::Error for CreateTextureError {}