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

@@ -244,7 +244,7 @@ impl CalendarParsedRXingResult {
fn format_event(allDay: bool, date: i64) -> String {
if date < 0 {
return "".to_owned();
return String::default();
}
let format_string = if allDay { "%F" } else { "%c" };
// DateFormat format = allDay
@@ -254,7 +254,7 @@ impl CalendarParsedRXingResult {
if let Some(dtm) = NaiveDateTime::from_timestamp_opt(date, 0) {
dtm.format(format_string).to_string()
} else {
String::from("")
String::default()
}
}