Vendor dependencies for 0.3.0 release

This commit is contained in:
2025-09-27 10:29:08 -05:00
parent 0c8d39d483
commit 82ab7f317b
26803 changed files with 16134934 additions and 0 deletions

31
vendor/ktx2/src/error.rs vendored Normal file
View File

@@ -0,0 +1,31 @@
use core::fmt;
#[cfg(feature = "std")]
use std::error::Error;
/// Error, that happend when data doesn't satisfy expected parameters.
#[derive(Debug)]
#[non_exhaustive]
pub enum ParseError {
/// Unexpected magic numbers
BadMagic,
/// Zero pixel width
ZeroWidth,
/// Zero face count
ZeroFaceCount,
/// Unexpected end of buffer
UnexpectedEnd,
}
#[cfg(feature = "std")]
impl Error for ParseError {}
impl fmt::Display for ParseError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match &self {
ParseError::BadMagic => f.pad("unexpected magic numbers"),
ParseError::ZeroWidth => f.pad("zero pixel width"),
ParseError::ZeroFaceCount => f.pad("zero face count"),
ParseError::UnexpectedEnd => f.pad("unexpected end of buffer"),
}
}
}