eliminate warnings

This commit is contained in:
xqtc 2025-04-03 17:44:26 +02:00
parent 0f894f930a
commit 0edaa8da08
Signed by: xqtc
GPG key ID: 2C064D095926D9D1
2 changed files with 2 additions and 2 deletions

Binary file not shown.

View file

@ -329,7 +329,7 @@ pub fn edit_ingestion_entry(conn: &sqlite::Connection) -> Result<(), Box<dyn Err
let substance_data = &substances[&substance];
// Extract routes of administration
let mut routes = Vec::new();
let routes: Vec<String>;
if let Some(formatted_dose) = substance_data["formatted_dose"].as_object() {
routes = formatted_dose.keys().map(|k| k.to_string()).collect();
} else {
@ -371,7 +371,7 @@ pub fn edit_ingestion_entry(conn: &sqlite::Connection) -> Result<(), Box<dyn Err
.prompt()?;
// Ask for the ingestion time (default to the original)
let default_date = selected_entry.ingestion_time.date().naive_local();
let default_date = selected_entry.ingestion_time.date_naive();
let ingestion_date = DateSelect::new("Select ingestion date:")
.with_default(default_date)
.prompt()?;