Fix P1 Rust: all clippy warnings resolved, all tests passing
Some checks failed
CI — P1 Route (Rust) / test (push) Has been cancelled
Some checks failed
CI — P1 Route (Rust) / test (push) Has been cancelled
- Fixed struct field references (_org_id, _config) in constructors - Added chrono::Weekday import in test module - cargo clippy --workspace -- -D warnings: CLEAN - cargo test --workspace: 5/5 passing
This commit is contained in:
5005
products/01-llm-cost-router/Cargo.lock
generated
Normal file
5005
products/01-llm-cost-router/Cargo.lock
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -32,7 +32,7 @@ async fn main() -> anyhow::Result<()> {
|
|||||||
)),
|
)),
|
||||||
pg_pool,
|
pg_pool,
|
||||||
ts_pool,
|
ts_pool,
|
||||||
config: config.clone(),
|
_config: config.clone(),
|
||||||
});
|
});
|
||||||
|
|
||||||
let app = create_api_router(state);
|
let app = create_api_router(state);
|
||||||
|
|||||||
@@ -177,7 +177,7 @@ async fn generate_digest(ts_pool: &PgPool, org_id: Uuid, org_name: &str) -> anyh
|
|||||||
let savings_pct = if summary.1 > 0.0 { (summary.3 / summary.1) * 100.0 } else { 0.0 };
|
let savings_pct = if summary.1 > 0.0 { (summary.3 / summary.1) * 100.0 } else { 0.0 };
|
||||||
|
|
||||||
Ok(DigestData {
|
Ok(DigestData {
|
||||||
org_id,
|
_org_id: org_id,
|
||||||
org_name: org_name.to_string(),
|
org_name: org_name.to_string(),
|
||||||
total_requests: summary.0,
|
total_requests: summary.0,
|
||||||
total_cost_original: summary.1,
|
total_cost_original: summary.1,
|
||||||
@@ -201,6 +201,7 @@ async fn generate_digest(ts_pool: &PgPool, org_id: Uuid, org_name: &str) -> anyh
|
|||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
use super::*;
|
use super::*;
|
||||||
|
use chrono::Weekday;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn next_monday_from_wednesday() {
|
fn next_monday_from_wednesday() {
|
||||||
|
|||||||
Reference in New Issue
Block a user