Skip to content

Commit

Permalink
fix: bevy_mikktspace lint
Browse files Browse the repository at this point in the history
CI was raising an error about `ref_as_ptr` being an unknown lint. Instead of trying to figure out what was going on, I instead opted to just fix the lint.
  • Loading branch information
BD103 committed Apr 10, 2024
1 parent 47dc18f commit a00de70
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
6 changes: 3 additions & 3 deletions crates/bevy_mikktspace/src/generated.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
unsafe_code
)]

use std::ptr::null_mut;
use std::ptr::{self, null_mut};

use glam::Vec3;

Expand Down Expand Up @@ -830,15 +830,15 @@ unsafe fn Build4RuleGroups(
let mut neigh_indexR: i32 = 0;
let vert_index: i32 = *piTriListIn.offset((f * 3i32 + i) as isize);
let ref mut fresh2 = (*pTriInfos.offset(f as isize)).AssignedGroup[i as usize];
*fresh2 = &mut *pGroups.offset(iNrActiveGroups as isize) as *mut SGroup;
*fresh2 = ptr::from_mut(&mut *pGroups.offset(iNrActiveGroups as isize));
(*(*pTriInfos.offset(f as isize)).AssignedGroup[i as usize])
.iVertexRepresentative = vert_index;
(*(*pTriInfos.offset(f as isize)).AssignedGroup[i as usize]).bOrientPreservering =
(*pTriInfos.offset(f as isize)).iFlag & 8i32 != 0i32;
(*(*pTriInfos.offset(f as isize)).AssignedGroup[i as usize]).iNrFaces = 0i32;
let ref mut fresh3 =
(*(*pTriInfos.offset(f as isize)).AssignedGroup[i as usize]).pFaceIndices;
*fresh3 = &mut *piGroupTrianglesBuffer.offset(iOffset as isize) as *mut i32;
*fresh3 = ptr::from_mut(&mut *piGroupTrianglesBuffer.offset(iOffset as isize));
iNrActiveGroups += 1;
AddTriToGroup((*pTriInfos.offset(f as isize)).AssignedGroup[i as usize], f);
bOrPre = if (*pTriInfos.offset(f as isize)).iFlag & 8i32 != 0i32 {
Expand Down
3 changes: 1 addition & 2 deletions crates/bevy_mikktspace/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
unsafe_op_in_unsafe_fn,
clippy::all,
clippy::undocumented_unsafe_blocks,
clippy::ptr_cast_constness,
clippy::ref_as_ptr
clippy::ptr_cast_constness
)]
// FIXME(3492): remove once docs are ready
#![allow(missing_docs)]
Expand Down

0 comments on commit a00de70

Please sign in to comment.