Remove unwrap() from time() function

This change is a part of the effort to enable clippy::option_unwrap_used and clippy::result_unwrap_used
This commit is contained in:
Alexander Krotov
2019-12-21 03:28:09 +03:00
committed by Floris Bruynooghe
parent 300fff40e3
commit cd198223ea

View File

@@ -486,7 +486,7 @@ pub(crate) fn dc_get_next_backup_path(
pub(crate) fn time() -> i64 {
SystemTime::now()
.duration_since(SystemTime::UNIX_EPOCH)
.unwrap()
.unwrap_or_default()
.as_secs() as i64
}