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

@@ -180,7 +180,7 @@ impl RGBLuminanceSource {
) -> Result<Self, Exceptions> {
if left + width > data_width || top + height > data_height {
return Err(Exceptions::illegalArgument(
"Crop rectangle does not fit within image data.".to_owned(),
"Crop rectangle does not fit within image data.",
));
}
Ok(Self {