From c303f4ab56570acab85f8e852b570e30648866ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C5=91rinc=20Serf=C5=91z=C5=91?= Date: Sun, 5 Dec 2021 11:34:27 +0100 Subject: [PATCH] Fixed when nothing to be filled in a non-empty datafile --- Cargo.lock | 2 +- Cargo.toml | 2 +- src/main.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 516a3a2..0134cef 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -168,7 +168,7 @@ checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" [[package]] name = "genee" -version = "0.4.0" +version = "0.4.1" dependencies = [ "anyhow", "chrono", diff --git a/Cargo.toml b/Cargo.toml index 343bb31..fde07eb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "genee" -version = "0.4.0" +version = "0.4.1" authors = ["Lőrinc Serfőző "] edition = "2018" default-run = "genee" diff --git a/src/main.rs b/src/main.rs index 2d23eac..bb7b7b1 100644 --- a/src/main.rs +++ b/src/main.rs @@ -237,7 +237,7 @@ fn fill_datafile( mut data: DiaryData, ) -> Result { let mut missing_dates = datafile::get_missing_dates(&data, from_date, to_date); - if missing_dates.is_empty() { + if data.data.is_empty() { missing_dates.push( Local::today() .naive_local()