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

@@ -155,7 +155,7 @@ const ALOG: [u32; 255] = {
pub fn encodeECC200(codewords: &str, symbolInfo: &SymbolInfo) -> Result<String, Exceptions> {
if codewords.chars().count() != symbolInfo.getDataCapacity() as usize {
return Err(Exceptions::illegalArgument(
"The number of codewords does not match the selected symbol".to_owned(),
"The number of codewords does not match the selected symbol",
));
}
let mut sb = String::with_capacity(