diff options
Diffstat (limited to 'src/db/incomes.rs')
-rw-r--r-- | src/db/incomes.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/db/incomes.rs b/src/db/incomes.rs index 90282c0..688e9e1 100644 --- a/src/db/incomes.rs +++ b/src/db/incomes.rs @@ -373,8 +373,8 @@ fn cumulative_query(from: NaiveDate) -> String { ON users.id = incomes.user_id "#, - bounded_query(">".to_string(), from.format("%Y-%m-%d").to_string()), - bounded_query("<".to_string(), "date()".to_string()) + bounded_query(">", &from.format("%Y-%m-%d").to_string()), + bounded_query("<", "date()") ) } @@ -382,7 +382,7 @@ fn cumulative_query(from: NaiveDate) -> String { /// /// It filters incomes according to the operator and date, /// and adds the income at this date. -fn bounded_query(op: String, date: String) -> String { +fn bounded_query(op: &str, date: &str) -> String { format!( r#" SELECT |