Implement clippy suggestions

This commit is contained in:
Henry Schimke
2023-01-04 14:48:16 -06:00
parent c65eadf102
commit 48287631dd
196 changed files with 2465 additions and 2574 deletions

View File

@@ -65,10 +65,10 @@ impl Encoder for Base256Encoder {
let (ci_pos, _) = buffer.char_indices().nth(1).unwrap();
buffer.insert(ci_pos, char::from_u32(dataCount as u32 % 250).unwrap());
} else {
return Err(Exceptions::IllegalStateException(format!(
return Err(Exceptions::IllegalStateException(Some(format!(
"Message length not in valid ranges: {}",
dataCount
)));
))));
}
}
let c = buffer.chars().count();
@@ -96,3 +96,9 @@ impl Base256Encoder {
}
}
}
impl Default for Base256Encoder {
fn default() -> Self {
Self::new()
}
}