melib/datetime: fix test compile failure

lazy_fetch
Manos Pitsidianakis 2021-01-08 18:00:56 +02:00
parent 2f47f1eebd
commit 08af46f5ef
Signed by: Manos Pitsidianakis
GPG Key ID: 73627C2F690DF710
2 changed files with 2 additions and 1 deletions

View File

@ -34,7 +34,7 @@
//! assert_eq!(timestamp, 1578509043);
//!
//! // Convert timestamp back to string
//! let s = timestamp_to_string(timestamp, Some("%Y-%m-%d"));
//! let s = timestamp_to_string(timestamp, Some("%Y-%m-%d"), true);
//! assert_eq!(s, "2020-01-08");
//! ```
use crate::error::{Result, ResultIntoMeliError};

View File

@ -393,6 +393,7 @@ impl Component for SVGScreenshotFilter {
let mut filename = melib::datetime::timestamp_to_string(
melib::datetime::now(),
Some("meli Screenshot - %e %h %Y %H:%M:%S.svg"),
true,
);
while std::path::Path::new(&filename).exists() {
filename.pop();