mirror of
https://codeberg.org/icewind/vmdl.git
synced 2026-06-04 00:54:14 +02:00
ci
This commit is contained in:
parent
4be7e6db0a
commit
377e1773c0
14 changed files with 2683 additions and 32 deletions
|
|
@ -26,7 +26,7 @@ impl Mdl {
|
|||
body_parts: header
|
||||
.body_part_indexes()
|
||||
.map(|index| {
|
||||
let data = data.get(index..).ok_or_else(|| ModelError::OutOfBounds {
|
||||
let data = data.get(index..).ok_or(ModelError::OutOfBounds {
|
||||
data: "BodyPart",
|
||||
offset: index,
|
||||
})?;
|
||||
|
|
|
|||
|
|
@ -204,7 +204,7 @@ bitflags! {
|
|||
impl StudioHeader {
|
||||
pub fn header2_index(&self) -> Option<usize> {
|
||||
(self.studio_hdr2_index > 0)
|
||||
.then(|| self.studio_hdr2_index)
|
||||
.then_some(self.studio_hdr2_index)
|
||||
.and_then(|index| usize::try_from(index).ok())
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue