chore: fix format and clippy
Some checks failed
Rust CI / Security Audit (push) Has been cancelled
Rust CI / Check + Test + Lint (nightly) (push) Has been cancelled
Rust CI / Check + Test + Lint (stable) (push) Has been cancelled

This commit is contained in:
Jesús Pérez 2026-02-03 22:03:41 +00:00
parent fe4d138a14
commit fcb928bf74
Signed by: jesus
GPG Key ID: 9F243E355E0BC939
3 changed files with 6 additions and 8 deletions

View File

@ -200,10 +200,8 @@ impl ProviderAnalyticsService {
} }
task_count += 1; task_count += 1;
if let Some(outcome) = obj.get("outcome").and_then(|v| v.as_str()) { if matches!(obj.get("outcome").and_then(|v| v.as_str()), Some("success")) {
if outcome == "success" { successful_count += 1;
successful_count += 1;
}
} }
if let Some(duration) = obj.get("duration_ms").and_then(|v| v.as_u64()) { if let Some(duration) = obj.get("duration_ms").and_then(|v| v.as_u64()) {
@ -235,6 +233,7 @@ impl ProviderAnalyticsService {
} }
/// Get cost forecast for a provider /// Get cost forecast for a provider
#[allow(clippy::excessive_nesting)]
pub async fn forecast_provider_costs( pub async fn forecast_provider_costs(
&self, &self,
provider: &str, provider: &str,
@ -271,14 +270,12 @@ impl ProviderAnalyticsService {
if let Some(executed_at) = obj.get("executed_at").and_then(|v| v.as_str()) { if let Some(executed_at) = obj.get("executed_at").and_then(|v| v.as_str()) {
let date_str = executed_at.split('T').next().unwrap_or("").to_string(); let date_str = executed_at.split('T').next().unwrap_or("").to_string();
if let Some(ref last_date) = &last_date_str {
if let Some(ref last_date) = last_date_str {
if last_date != &date_str && current_day_cost > 0 { if last_date != &date_str && current_day_cost > 0 {
daily_costs.push(current_day_cost); daily_costs.push(current_day_cost);
current_day_cost = 0; current_day_cost = 0;
} }
} }
last_date_str = Some(date_str); last_date_str = Some(date_str);
} }

View File

@ -9,7 +9,7 @@ use thiserror::Error;
use crate::workflow::state::{Phase, StepStatus, Workflow, WorkflowStep}; use crate::workflow::state::{Phase, StepStatus, Workflow, WorkflowStep};
#[derive(Debug, Error)] #[derive(Debug, Error)]
#[allow(dead_code)] #[allow(dead_code, clippy::enum_variant_names)]
pub enum ParserError { pub enum ParserError {
#[error("Failed to read file: {0}")] #[error("Failed to read file: {0}")]
FileError(#[from] std::io::Error), FileError(#[from] std::io::Error),

View File

@ -24,6 +24,7 @@ pub struct Scheduler;
impl Scheduler { impl Scheduler {
/// Resolve dependencies using topological sort (Kahn's algorithm) /// Resolve dependencies using topological sort (Kahn's algorithm)
/// Returns levels of steps that can be executed in parallel /// Returns levels of steps that can be executed in parallel
#[allow(clippy::excessive_nesting)]
pub fn resolve_dependencies( pub fn resolve_dependencies(
steps: &[WorkflowStep], steps: &[WorkflowStep],
) -> Result<Vec<Vec<String>>, SchedulerError> { ) -> Result<Vec<Vec<String>>, SchedulerError> {