refactor: consolidate #![allow(clippy::cast_*)] to crate roots
Add the cast-allow block to zesdex-entities/src/lib.rs and zesdex-utils/src/lib.rs (which lacked it), then remove from 65 sub-files across all 8 crates. Build and all 223 tests continue to pass. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
4cd38c9291
commit
7d8487cefb
@@ -3,13 +3,6 @@
|
||||
//! `ConversationServiceImpl` is generic over `R: ConversationRepository`,
|
||||
//! delegating all persistence to that adapter.
|
||||
|
||||
#![allow(
|
||||
clippy::cast_possible_truncation,
|
||||
clippy::cast_sign_loss,
|
||||
clippy::cast_precision_loss,
|
||||
clippy::cast_possible_wrap
|
||||
)]
|
||||
|
||||
use anyhow::{Context, Result};
|
||||
|
||||
use crate::domain::conversation::{ChatMessage, Conversation};
|
||||
|
||||
@@ -3,13 +3,6 @@
|
||||
//! `MemoryServiceImpl` is generic over `R: MemoryRepository`, delegating
|
||||
//! all persistence to that adapter.
|
||||
|
||||
#![allow(
|
||||
clippy::cast_possible_truncation,
|
||||
clippy::cast_sign_loss,
|
||||
clippy::cast_precision_loss,
|
||||
clippy::cast_possible_wrap
|
||||
)]
|
||||
|
||||
use anyhow::{Context, Result};
|
||||
|
||||
use crate::domain::memory::Memory;
|
||||
|
||||
@@ -3,13 +3,6 @@
|
||||
//! Each service is generic over its repository trait so the concrete
|
||||
//! persistence adapter is injected at composition root.
|
||||
|
||||
#![allow(
|
||||
clippy::cast_possible_truncation,
|
||||
clippy::cast_sign_loss,
|
||||
clippy::cast_precision_loss,
|
||||
clippy::cast_possible_wrap
|
||||
)]
|
||||
|
||||
pub mod conversation_service;
|
||||
pub mod memory_service;
|
||||
pub mod settings_service;
|
||||
|
||||
@@ -3,13 +3,6 @@
|
||||
//! `SettingsServiceImpl` is generic over `S: SettingsRepository` and
|
||||
//! `C: AppConfigRepository`, delegating all persistence to those adapters.
|
||||
|
||||
#![allow(
|
||||
clippy::cast_possible_truncation,
|
||||
clippy::cast_sign_loss,
|
||||
clippy::cast_precision_loss,
|
||||
clippy::cast_possible_wrap
|
||||
)]
|
||||
|
||||
use anyhow::Result;
|
||||
|
||||
use crate::domain::app_config::{AppConfig, ProviderConfig};
|
||||
|
||||
@@ -5,13 +5,6 @@
|
||||
//! This is a pure data structure with **no I/O logic**. Load/save
|
||||
//! responsibilities live in [`AppConfigRepository`](super::repository::AppConfigRepository).
|
||||
|
||||
#![allow(
|
||||
clippy::cast_possible_truncation,
|
||||
clippy::cast_sign_loss,
|
||||
clippy::cast_precision_loss,
|
||||
clippy::cast_possible_wrap
|
||||
)]
|
||||
|
||||
use std::collections::HashMap;
|
||||
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
@@ -4,13 +4,6 @@
|
||||
//! This is a pure data structure with **no I/O logic**. Load/save
|
||||
//! responsibilities live in [`EditLogRepository`](super::repository::EditLogRepository).
|
||||
|
||||
#![allow(
|
||||
clippy::cast_possible_truncation,
|
||||
clippy::cast_sign_loss,
|
||||
clippy::cast_precision_loss,
|
||||
clippy::cast_possible_wrap
|
||||
)]
|
||||
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
/// A single recorded file edit: which tool made it, to which path, why,
|
||||
|
||||
@@ -5,13 +5,6 @@
|
||||
//! This is a pure data structure with **no I/O logic**. Load/save
|
||||
//! responsibilities live in [`MemoryRepository`](super::repository::MemoryRepository).
|
||||
|
||||
#![allow(
|
||||
clippy::cast_possible_truncation,
|
||||
clippy::cast_sign_loss,
|
||||
clippy::cast_precision_loss,
|
||||
clippy::cast_possible_wrap
|
||||
)]
|
||||
|
||||
use std::path::{Path, PathBuf};
|
||||
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
@@ -3,13 +3,6 @@
|
||||
//! This layer has zero infrastructure dependencies; all I/O is expressed through
|
||||
//! repository traits defined in [`repository`].
|
||||
|
||||
#![allow(
|
||||
clippy::cast_possible_truncation,
|
||||
clippy::cast_sign_loss,
|
||||
clippy::cast_precision_loss,
|
||||
clippy::cast_possible_wrap
|
||||
)]
|
||||
|
||||
pub mod app_config;
|
||||
pub mod conversation;
|
||||
pub mod edit_log;
|
||||
|
||||
@@ -4,13 +4,6 @@
|
||||
//! adapters implement. The domain and application layers depend only on
|
||||
//! these traits, never on concrete persistence implementations.
|
||||
|
||||
#![allow(
|
||||
clippy::cast_possible_truncation,
|
||||
clippy::cast_sign_loss,
|
||||
clippy::cast_precision_loss,
|
||||
clippy::cast_possible_wrap
|
||||
)]
|
||||
|
||||
use std::path::Path;
|
||||
|
||||
use anyhow::Result;
|
||||
|
||||
@@ -3,13 +3,6 @@
|
||||
//! These traits are implemented by the application layer and consumed by
|
||||
//! infrastructure adapters (HTTP handlers, CLI commands, etc.).
|
||||
|
||||
#![allow(
|
||||
clippy::cast_possible_truncation,
|
||||
clippy::cast_sign_loss,
|
||||
clippy::cast_precision_loss,
|
||||
clippy::cast_possible_wrap
|
||||
)]
|
||||
|
||||
use anyhow::Result;
|
||||
|
||||
use super::conversation::{ChatMessage, Conversation};
|
||||
|
||||
@@ -5,13 +5,6 @@
|
||||
//! This is a pure data structure with **no I/O logic**. Load/save
|
||||
//! responsibilities live in [`SettingsRepository`](super::repository::SettingsRepository).
|
||||
|
||||
#![allow(
|
||||
clippy::cast_possible_truncation,
|
||||
clippy::cast_sign_loss,
|
||||
clippy::cast_precision_loss,
|
||||
clippy::cast_possible_wrap
|
||||
)]
|
||||
|
||||
use std::collections::HashMap;
|
||||
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
@@ -4,13 +4,6 @@
|
||||
//! They are independent of the domain entities so the API contract can
|
||||
//! evolve without coupling to the domain model.
|
||||
|
||||
#![allow(
|
||||
clippy::cast_possible_truncation,
|
||||
clippy::cast_sign_loss,
|
||||
clippy::cast_precision_loss,
|
||||
clippy::cast_possible_wrap
|
||||
)]
|
||||
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
@@ -5,13 +5,6 @@
|
||||
//! HTTP framework — callers (e.g. Axum routes) are responsible for mapping
|
||||
//! `Result` into HTTP responses.
|
||||
|
||||
#![allow(
|
||||
clippy::cast_possible_truncation,
|
||||
clippy::cast_sign_loss,
|
||||
clippy::cast_precision_loss,
|
||||
clippy::cast_possible_wrap
|
||||
)]
|
||||
|
||||
use anyhow::{Context, Result};
|
||||
|
||||
use crate::domain::memory::Memory;
|
||||
|
||||
@@ -1,12 +1,5 @@
|
||||
//! HTTP adapter — handler functions and DTOs for CMS REST endpoints.
|
||||
|
||||
#![allow(
|
||||
clippy::cast_possible_truncation,
|
||||
clippy::cast_sign_loss,
|
||||
clippy::cast_precision_loss,
|
||||
clippy::cast_possible_wrap
|
||||
)]
|
||||
|
||||
pub mod dto;
|
||||
pub mod handlers;
|
||||
|
||||
|
||||
@@ -2,12 +2,5 @@
|
||||
//!
|
||||
//! Contains persistence implementations (file I/O) and HTTP handler adapters.
|
||||
|
||||
#![allow(
|
||||
clippy::cast_possible_truncation,
|
||||
clippy::cast_sign_loss,
|
||||
clippy::cast_precision_loss,
|
||||
clippy::cast_possible_wrap
|
||||
)]
|
||||
|
||||
pub mod http;
|
||||
pub mod persistence;
|
||||
|
||||
@@ -5,13 +5,6 @@
|
||||
//! On load, auto-detects Claude credentials from the environment or
|
||||
//! `~/.claude/settings.json` and merges them into the provider map.
|
||||
|
||||
#![allow(
|
||||
clippy::cast_possible_truncation,
|
||||
clippy::cast_sign_loss,
|
||||
clippy::cast_precision_loss,
|
||||
clippy::cast_possible_wrap
|
||||
)]
|
||||
|
||||
use std::path::Path;
|
||||
|
||||
use anyhow::{Context, Result};
|
||||
|
||||
@@ -4,13 +4,6 @@
|
||||
//!
|
||||
//! Uses write-then-rename with fsync for crash safety.
|
||||
|
||||
#![allow(
|
||||
clippy::cast_possible_truncation,
|
||||
clippy::cast_sign_loss,
|
||||
clippy::cast_precision_loss,
|
||||
clippy::cast_possible_wrap
|
||||
)]
|
||||
|
||||
use std::path::Path;
|
||||
|
||||
use anyhow::{Context, Result};
|
||||
|
||||
@@ -5,13 +5,6 @@
|
||||
//! Append-only log: new entries are appended to the file, never rewritten.
|
||||
//! In-memory cache is capped at 10K entries to prevent unbounded growth.
|
||||
|
||||
#![allow(
|
||||
clippy::cast_possible_truncation,
|
||||
clippy::cast_sign_loss,
|
||||
clippy::cast_precision_loss,
|
||||
clippy::cast_possible_wrap
|
||||
)]
|
||||
|
||||
use std::io::{BufRead, BufReader, Write};
|
||||
use std::path::Path;
|
||||
|
||||
|
||||
@@ -7,13 +7,6 @@
|
||||
//! name, description, kind, created_at, updated_at, lifecycle,
|
||||
//! outcome, scope, before, after, provenances
|
||||
|
||||
#![allow(
|
||||
clippy::cast_possible_truncation,
|
||||
clippy::cast_sign_loss,
|
||||
clippy::cast_precision_loss,
|
||||
clippy::cast_possible_wrap
|
||||
)]
|
||||
|
||||
use std::collections::HashMap;
|
||||
use std::io::Write;
|
||||
use std::path::Path;
|
||||
|
||||
@@ -1,12 +1,5 @@
|
||||
//! Persistence adapters — concrete file-based repository implementations.
|
||||
|
||||
#![allow(
|
||||
clippy::cast_possible_truncation,
|
||||
clippy::cast_sign_loss,
|
||||
clippy::cast_precision_loss,
|
||||
clippy::cast_possible_wrap
|
||||
)]
|
||||
|
||||
pub mod app_config_repo;
|
||||
pub mod conversation_repo;
|
||||
pub mod edit_log_repo;
|
||||
|
||||
@@ -4,13 +4,6 @@
|
||||
//!
|
||||
//! Uses write-then-rename with fsync for crash safety.
|
||||
|
||||
#![allow(
|
||||
clippy::cast_possible_truncation,
|
||||
clippy::cast_sign_loss,
|
||||
clippy::cast_precision_loss,
|
||||
clippy::cast_possible_wrap
|
||||
)]
|
||||
|
||||
use std::path::Path;
|
||||
|
||||
use anyhow::{Context, Result};
|
||||
|
||||
Reference in New Issue
Block a user