remove more needless String conversions

This commit is contained in:
Vukašin Stepanović
2023-02-15 11:18:56 +00:00
parent 528ddea41c
commit df8828331d
4 changed files with 6 additions and 10 deletions

View File

@@ -49,9 +49,7 @@ impl GenericGFPoly {
*/
pub fn new(field: GenericGFRef, coefficients: &[i32]) -> Result<Self, Exceptions> {
if coefficients.is_empty() {
return Err(Exceptions::illegalArgument(String::from(
"coefficients cannot be empty",
)));
return Err(Exceptions::illegalArgument("coefficients cannot be empty"));
}
Ok(Self {
field,