Merge branch 'main' into pr/point_refactor

This commit is contained in:
Vukašin Stepanović
2023-02-16 16:43:24 +00:00
132 changed files with 1048 additions and 1329 deletions

View File

@@ -124,9 +124,7 @@ impl<'a> Detector<'_> {
|| !self.is_valid(bulls_eye_corners[2])
|| !self.is_valid(bulls_eye_corners[3])
{
return Err(Exceptions::NotFoundException(Some(
"no valid points".to_owned(),
)));
return Err(Exceptions::notFoundWith("no valid points"));
}
let length = 2 * self.nb_center_layers;
// Get the bits around the bull's eye
@@ -207,9 +205,7 @@ impl<'a> Detector<'_> {
return Ok(shift);
}
}
Err(Exceptions::NotFoundException(Some(
"rotation failure".to_owned(),
)))
Err(Exceptions::notFoundWith("rotation failure"))
}
/**
@@ -318,7 +314,7 @@ impl<'a> Detector<'_> {
}
if self.nb_center_layers != 5 && self.nb_center_layers != 7 {
return Err(Exceptions::NotFoundException(None));
return Err(Exceptions::notFound);
}
self.compact = self.nb_center_layers == 5;