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