Implement clippy suggestions

This commit is contained in:
Henry Schimke
2023-01-04 14:48:16 -06:00
parent c65eadf102
commit 48287631dd
196 changed files with 2465 additions and 2574 deletions

View File

@@ -144,9 +144,7 @@ pub trait GridSampler {
let x = points[offset] as i32;
let y = points[offset + 1] as i32;
if x < -1 || x > width.try_into().unwrap() || y < -1 || y > height.try_into().unwrap() {
return Err(Exceptions::NotFoundException(
"getNotFoundInstance".to_owned(),
));
return Err(Exceptions::NotFoundException(None));
}
nudged = false;
if x == -1 {
@@ -173,9 +171,7 @@ pub trait GridSampler {
let x = points[offset as usize] as i32;
let y = points[offset as usize + 1] as i32;
if x < -1 || x > width.try_into().unwrap() || y < -1 || y > height.try_into().unwrap() {
return Err(Exceptions::NotFoundException(
"getNotFoundInstance".to_owned(),
));
return Err(Exceptions::NotFoundException(None));
}
nudged = false;
if x == -1 {