cleanup: drop two #[allow] attributes that were hiding real dead code
Some checks failed
lakehouse/auditor 1 blocking issue: todo!() macro call in tests/real-world/scrum_master_pipeline.ts
Some checks failed
lakehouse/auditor 1 blocking issue: todo!() macro call in tests/real-world/scrum_master_pipeline.ts
- ingestd/src/service.rs: top-of-file `#[allow(unused_imports)]`
was masking genuinely unused `delete` and `patch` routing
constructors in an axum import block. Removed the attribute,
trimmed the imports to only `get` and `post` (what's actually
used). Any future over-import now trips the unused_imports
lint immediately instead of being silently allowed.
- gateway/src/v1/truth.rs: `truth_router()` was a 4-line stub
wrapping a single `/context` route — carried `#[allow(dead_code)]`
because v1/mod.rs wires `get(truth::context)` directly onto its
own router, bypassing this helper. Zero callers across the
workspace. Deleted the function + allow + now-unused Router
import. Left a breadcrumb comment pointing to the real wiring.
Workspace warnings: 0 (lib + tests). Each #[allow] removed raises
the bar on future code entering these modules — the linter now
catches the same classes of bugs at PR time.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
ffdc842ec3
commit
5df4d48109
@ -1,12 +1,10 @@
|
|||||||
use axum::{routing::get, Router};
|
|
||||||
use serde::Serialize;
|
use serde::Serialize;
|
||||||
use truth::default_truth_store;
|
use truth::default_truth_store;
|
||||||
|
|
||||||
#[allow(dead_code)]
|
// Note: truth_router() was a stub wrapper around a single /context route
|
||||||
pub fn truth_router() -> Router {
|
// that nothing called — v1/mod.rs wires get(truth::context) directly
|
||||||
Router::new()
|
// onto its own router. Removed 2026-04-24 along with its #[allow(dead_code)]
|
||||||
.route("/context", get(context))
|
// attribute; the handler below is the real surface.
|
||||||
}
|
|
||||||
|
|
||||||
#[derive(Serialize)]
|
#[derive(Serialize)]
|
||||||
pub struct ContextResponse {
|
pub struct ContextResponse {
|
||||||
|
|||||||
@ -1,10 +1,9 @@
|
|||||||
#[allow(unused_imports)]
|
|
||||||
use axum::{
|
use axum::{
|
||||||
Json, Router,
|
Json, Router,
|
||||||
extract::{Multipart, Path, Query, State},
|
extract::{Multipart, Path, Query, State},
|
||||||
http::{HeaderMap, StatusCode},
|
http::{HeaderMap, StatusCode},
|
||||||
response::IntoResponse,
|
response::IntoResponse,
|
||||||
routing::{delete, get, patch, post},
|
routing::{get, post},
|
||||||
};
|
};
|
||||||
use bytes::Bytes;
|
use bytes::Bytes;
|
||||||
use object_store::ObjectStore;
|
use object_store::ObjectStore;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user