Fix clippy lints and update packages (#568)

# Conflicts:
#	Cargo.lock
This commit is contained in:
0HyperCube
2022-03-14 14:23:08 -07:00
committed by Keavon Chambers
parent a1b91c75c7
commit bac34e3e64
9 changed files with 266 additions and 266 deletions
+2 -2
View File
@@ -186,7 +186,7 @@ impl Layer {
match &self.data {
LayerDataType::Shape(s) => Ok(&s.style),
LayerDataType::Text(t) => Ok(&t.style),
_ => return Err(DocumentError::NotAShape),
_ => Err(DocumentError::NotAShape),
}
}
@@ -194,7 +194,7 @@ impl Layer {
match &mut self.data {
LayerDataType::Shape(s) => Ok(&mut s.style),
LayerDataType::Text(t) => Ok(&mut t.style),
_ => return Err(DocumentError::NotAShape),
_ => Err(DocumentError::NotAShape),
}
}
}
+3 -3
View File
@@ -192,9 +192,9 @@ impl ShapeLayer {
// Solve with Thomas algorithm (see https://en.wikipedia.org/wiki/Tridiagonal_matrix_algorithm)
for i in 1..n {
let m = a[i] / b[i - 1];
// TODO: Fix Clippy warning which makes the borrow checker angry
b[i] = b[i] - m * c[i - 1];
r[i] = r[i] - m * r[i - 1];
b[i] -= m * c[i - 1];
let last_iteration_r = r[i - 1];
r[i] -= m * last_iteration_r;
}
// Determine first control point for each segment