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

@@ -163,8 +163,8 @@ impl ECIStringBuilder {
/**
* @return true iff nothing has been appended
*/
pub fn is_empty(&self) -> bool {
return self.current_bytes.is_empty() && self.result.is_empty();
pub fn is_empty(&mut self) -> bool {
self.current_bytes.is_empty() && self.result.is_empty()
}
pub fn build_result(mut self) -> Self {
@@ -180,3 +180,9 @@ impl fmt::Display for ECIStringBuilder {
write!(f, "{}", self.result)
}
}
impl Default for ECIStringBuilder {
fn default() -> Self {
Self::new()
}
}