Fix Rust 1.97 imaging gate lints
All checks were successful
Imaging and meshing gate / native (push) Successful in 2m40s
JPEG 2000 feature / linux (push) Successful in 1m35s
Native Rust workspace compile / compile (push) Successful in 1m51s
Skia feature / linux (push) Successful in 31m16s

This commit is contained in:
2026-08-09 13:05:21 +00:00
parent aeb44fd089
commit a18b09d928
3 changed files with 10 additions and 10 deletions

View File

@@ -856,10 +856,10 @@ impl Profile {
for f in &mut self.faces { for f in &mut self.faces {
std::mem::swap(&mut f.v1, &mut f.v3); std::mem::swap(&mut f.v1, &mut f.v3);
} }
if self.calc_vertex_normals { if self.calc_vertex_normals
if let Some(n) = self.vertex_normals.last_mut() { && let Some(n) = self.vertex_normals.last_mut()
n.z = -n.z; {
} n.z = -n.z;
} }
self.face_normal.x = -self.face_normal.x; self.face_normal.x = -self.face_normal.x;
self.face_normal.y = -self.face_normal.y; self.face_normal.y = -self.face_normal.y;

View File

@@ -251,7 +251,7 @@ impl SculptMesh {
} }
let original_width = rows[0].len(); let original_width = rows[0].len();
if sculpt_type != SculptMeshSculptType::Plane { if sculpt_type != SculptMeshSculptType::Plane {
if rows.len() % 2 == 0 { if rows.len().is_multiple_of(2) {
for row in &mut rows { for row in &mut rows {
row.push(row[0]); row.push(row[0]);
} }
@@ -264,7 +264,7 @@ impl SculptMesh {
let top_pole = rows[0][original_width / 2]; let top_pole = rows[0][original_width / 2];
let bottom_pole = rows[rows.len() - 1][original_width / 2]; let bottom_pole = rows[rows.len() - 1][original_width / 2];
if sculpt_type == SculptMeshSculptType::Sphere { if sculpt_type == SculptMeshSculptType::Sphere {
if rows.len() % 2 == 0 { if rows.len().is_multiple_of(2) {
let count = rows[0].len(); let count = rows[0].len();
rows.insert(0, vec![top_pole; count]); rows.insert(0, vec![top_pole; count]);
rows.push(vec![bottom_pole; count]); rows.push(vec![bottom_pole; count]);

View File

@@ -1213,10 +1213,10 @@ impl TokenBucket {
if state.content.wrapping_sub(amount) < 0 { if state.content.wrapping_sub(amount) < 0 {
return Ok(false); return Ok(false);
} }
if let Some(parent) = &self.parent { if let Some(parent) = &self.parent
if !parent.remove_tokens_with_int32(amount)? { && !parent.remove_tokens_with_int32(amount)?
return Ok(false); {
} return Ok(false);
} }
state.content = state.content.wrapping_sub(amount); state.content = state.content.wrapping_sub(amount);
Ok(true) Ok(true)