mirror of
https://github.com/starovoid/rxing.git
synced 2026-07-26 12:22:34 +00:00
remove .to_owned() calls on &str in exceptions
This commit is contained in:
@@ -254,7 +254,7 @@ impl BitArray {
|
||||
pub fn appendBits(&mut self, value: u32, num_bits: usize) -> Result<(), Exceptions> {
|
||||
if num_bits > 32 {
|
||||
return Err(Exceptions::illegalArgument(
|
||||
"num bits must be between 0 and 32".to_owned(),
|
||||
"num bits must be between 0 and 32",
|
||||
));
|
||||
}
|
||||
|
||||
@@ -286,7 +286,7 @@ impl BitArray {
|
||||
|
||||
pub fn xor(&mut self, other: &BitArray) -> Result<(), Exceptions> {
|
||||
if self.size != other.size {
|
||||
return Err(Exceptions::illegalArgument("Sizes don't match".to_owned()));
|
||||
return Err(Exceptions::illegalArgument("Sizes don't match"));
|
||||
}
|
||||
for i in 0..self.bits.len() {
|
||||
//for (int i = 0; i < bits.length; i++) {
|
||||
|
||||
Reference in New Issue
Block a user