Compare commits
1 Commits
8181cc823e
...
80cf605960
| Author | SHA1 | Date | |
|---|---|---|---|
|
80cf605960
|
@@ -1,7 +1,4 @@
|
||||
#![warn(clippy::pedantic)]
|
||||
#![allow(clippy::unused_async)]
|
||||
// TODO: Enable once false positives are fixed.
|
||||
#![allow(clippy::assigning_clones)]
|
||||
|
||||
mod components;
|
||||
mod dotenv;
|
||||
|
||||
@@ -41,7 +41,6 @@ pub enum Category {
|
||||
#[cfg(feature = "server")]
|
||||
impl Category {
|
||||
pub fn eq_sql_predicate(&self) -> Box<dyn BoxableExpression<tasks::table, Pg, SqlType = Bool>> {
|
||||
#![allow(clippy::wildcard_imports)]
|
||||
use crate::schema::tasks::dsl::*;
|
||||
|
||||
match self {
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
// For Diesel DSL.
|
||||
#![allow(clippy::wildcard_imports)]
|
||||
|
||||
#[cfg(feature = "server")]
|
||||
pub(crate) mod database_connection;
|
||||
pub(crate) mod projects;
|
||||
|
||||
@@ -138,7 +138,7 @@ pub(crate) async fn complete_task(task_id: i32) -> Result<Task> {
|
||||
} = &mut new_task.category
|
||||
{
|
||||
match reoccurrence.interval {
|
||||
ReoccurrenceInterval::Day => *date = *date + Days::new(u64::from(reoccurrence.length)),
|
||||
ReoccurrenceInterval::Day => *date = *date + Days::new(reoccurrence.length as u64),
|
||||
ReoccurrenceInterval::Month | ReoccurrenceInterval::Year => {
|
||||
*date = *date
|
||||
+ Months::new(
|
||||
@@ -153,12 +153,12 @@ pub(crate) async fn complete_task(task_id: i32) -> Result<Task> {
|
||||
date.year(),
|
||||
date.month(),
|
||||
reoccurrence.start_date.day().min(
|
||||
u32::from(Month::try_from(u8::try_from(date.month()).unwrap())
|
||||
Month::try_from(date.month() as u8)
|
||||
.unwrap()
|
||||
.length(date.year())),
|
||||
.length(date.year()) as u32,
|
||||
),
|
||||
)
|
||||
.unwrap();
|
||||
.unwrap()
|
||||
}
|
||||
}
|
||||
restore_subtasks_of_task(task_id).await?;
|
||||
|
||||
Reference in New Issue
Block a user