standardize empty string to String::default()

This replaces "".to_owned() "".to_string() and String::from("")
This commit is contained in:
Henry Schimke
2023-02-04 13:13:05 -06:00
parent ae7562af28
commit 92f15be032
26 changed files with 102 additions and 108 deletions

View File

@@ -57,7 +57,7 @@ impl<'a> GeneralAppIdDecoder<'_> {
) -> Result<String, Exceptions> {
let mut buff = buff;
let mut currentPosition = initialPosition;
let mut remaining = "".to_owned();
let mut remaining = String::default();
loop {
let info = self.decodeGeneralPurposeField(currentPosition, &remaining)?;
let parsedFields = field_parser::parseFieldsInGeneralPurpose(info.getNewString())?;
@@ -67,7 +67,7 @@ impl<'a> GeneralAppIdDecoder<'_> {
if info.isRemaining() {
remaining = info.getRemainingValue().to_string();
} else {
remaining = "".to_owned();
remaining = String::default();
}
if currentPosition == info.getNewPosition() {