mirror of
https://github.com/starovoid/rxing.git
synced 2026-07-27 21:02:35 +00:00
cleanup more warnings and deprecated function use
This commit is contained in:
@@ -256,9 +256,11 @@ impl CalendarParsedRXingResult {
|
||||
// ? DateFormat.getDateInstance(DateFormat.MEDIUM)
|
||||
// : DateFormat.getDateTimeInstance(DateFormat.MEDIUM, DateFormat.MEDIUM);
|
||||
// return format.format(date);
|
||||
NaiveDateTime::from_timestamp(date, 0)
|
||||
.format(format_string)
|
||||
.to_string()
|
||||
if let Some(dtm) = NaiveDateTime::from_timestamp_opt(date, 0) {
|
||||
dtm.format(format_string).to_string()
|
||||
} else {
|
||||
String::from("")
|
||||
}
|
||||
}
|
||||
|
||||
fn parseDurationMS(durationString: &str) -> i64 {
|
||||
|
||||
Reference in New Issue
Block a user