eliminate warnings
This commit is contained in:
parent
0f894f930a
commit
0edaa8da08
2 changed files with 2 additions and 2 deletions
BIN
ingestions.db
BIN
ingestions.db
Binary file not shown.
|
@ -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()?;
|
||||
|
|
Loading…
Add table
Reference in a new issue