Browse Source

melib/datetime: fix test compile failure

lazy_fetch
Manos Pitsidianakis 11 months ago
parent
commit
08af46f5ef
Signed by: epilys GPG Key ID: 73627C2F690DF710
  1. 2
      melib/src/datetime.rs
  2. 1
      src/components/svg.rs

2
melib/src/datetime.rs

@ -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};

1
src/components/svg.rs

@ -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();

Loading…
Cancel
Save