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

@@ -234,9 +234,7 @@ impl C40Encoder {
context.writeCodeword(C40_UNLATCH);
}
} else {
return Err(Exceptions::illegalState(
"Unexpected case. Please report!".to_owned(),
));
return Err(Exceptions::illegalState("Unexpected case. Please report!"));
}
context.signalEncoderChange(ASCII_ENCODATION);