chore: enable Clippy pedantic lints
All checks were successful
actionlint check / actionlint check (pull_request) Successful in 7s
conventional pull request title check / conventional pull request title check (pull_request) Successful in 3m44s
dotenv-linter check / dotenv-linter check (pull_request) Successful in 3m46s
GitLeaks check / GitLeaks check (pull_request) Successful in 1m45s
Prettier check / Prettier check (pull_request) Successful in 2m1s
markdownlint check / markdownlint check (pull_request) Successful in 2m4s
htmlhint check / htmlhint check (pull_request) Successful in 2m6s
ShellCheck check / ShellCheck check (pull_request) Successful in 1m15s
yamllint check / yamllint check (pull_request) Successful in 1m11s
Stylelint check / Stylelint check (pull_request) Successful in 1m13s
Rust check / Rust check (pull_request) Successful in 22m46s
conventional commit messages check / conventional commit messages check (pull_request) Successful in 19s
hadolint check / hadolint check (pull_request) Successful in 25s
checkov check / checkov check (pull_request) Successful in 56s
All checks were successful
actionlint check / actionlint check (pull_request) Successful in 7s
conventional pull request title check / conventional pull request title check (pull_request) Successful in 3m44s
dotenv-linter check / dotenv-linter check (pull_request) Successful in 3m46s
GitLeaks check / GitLeaks check (pull_request) Successful in 1m45s
Prettier check / Prettier check (pull_request) Successful in 2m1s
markdownlint check / markdownlint check (pull_request) Successful in 2m4s
htmlhint check / htmlhint check (pull_request) Successful in 2m6s
ShellCheck check / ShellCheck check (pull_request) Successful in 1m15s
yamllint check / yamllint check (pull_request) Successful in 1m11s
Stylelint check / Stylelint check (pull_request) Successful in 1m13s
Rust check / Rust check (pull_request) Successful in 22m46s
conventional commit messages check / conventional commit messages check (pull_request) Successful in 19s
hadolint check / hadolint check (pull_request) Successful in 25s
checkov check / checkov check (pull_request) Successful in 56s
This commit is contained in:
@@ -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(reoccurrence.length as u64),
|
||||
ReoccurrenceInterval::Day => *date = *date + Days::new(u64::from(reoccurrence.length)),
|
||||
ReoccurrenceInterval::Month | ReoccurrenceInterval::Year => {
|
||||
*date = *date
|
||||
+ Months::new(
|
||||
@@ -152,13 +152,13 @@ pub(crate) async fn complete_task(task_id: i32) -> Result<Task> {
|
||||
*date = NaiveDate::from_ymd_opt(
|
||||
date.year(),
|
||||
date.month(),
|
||||
reoccurrence.start_date.day().min(
|
||||
Month::try_from(date.month() as u8)
|
||||
reoccurrence.start_date.day().min(u32::from(
|
||||
Month::try_from(u8::try_from(date.month()).unwrap())
|
||||
.unwrap()
|
||||
.length(date.year()) as u32,
|
||||
),
|
||||
.length(date.year()),
|
||||
)),
|
||||
)
|
||||
.unwrap()
|
||||
.unwrap();
|
||||
}
|
||||
}
|
||||
restore_subtasks_of_task(task_id).await?;
|
||||
|
||||
Reference in New Issue
Block a user