remove .to_owned() calls on &str in exceptions

This commit is contained in:
Vukašin Stepanović
2023-02-15 11:03:27 +00:00
parent 722ce78fd0
commit 528ddea41c
47 changed files with 107 additions and 167 deletions

View File

@@ -127,7 +127,7 @@ impl<'a> Detector<'_> {
|| !self.is_valid(&bulls_eye_corners[2])
|| !self.is_valid(&bulls_eye_corners[3])
{
return Err(Exceptions::notFound("no valid points".to_owned()));
return Err(Exceptions::notFound("no valid points"));
}
let length = 2 * self.nb_center_layers;
// Get the bits around the bull's eye
@@ -208,7 +208,7 @@ impl<'a> Detector<'_> {
return Ok(shift);
}
}
Err(Exceptions::notFound("rotation failure".to_owned()))
Err(Exceptions::notFound("rotation failure"))
}
/**