ingestd: scope test-only imports into the test module
schema_evolution.rs had two `#[allow(unused_imports)]` attributes hiding
over-broad top-level imports:
- `Schema` was imported at crate level but only used in test code
- `Arc` was imported at crate level but only used in test code
- `DataType` and `SchemaRef` were actually used (28 references) — the
allow on that line was cargo-culted.
Fix: drop the allows, move Schema + Arc into the #[cfg(test)] block
where they're actually used. The non-test build no longer imports
symbols it doesn't need. Test build still works because the imports
are now in the test module's scope.
Workspace warnings still at 0 (lib + tests). Net: -3 import lines
from crate scope, +2 into test scope.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
12e615bb5d
commit
ffdc842ec3
@ -2,12 +2,9 @@
|
||||
/// When a source changes format (columns renamed, added, removed, type changed),
|
||||
/// the system detects the diff and can auto-map using AI or heuristic matching.
|
||||
|
||||
#[allow(unused_imports)]
|
||||
use arrow::datatypes::{DataType, Schema, SchemaRef};
|
||||
use arrow::datatypes::{DataType, SchemaRef};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::collections::HashMap;
|
||||
#[allow(unused_imports)]
|
||||
use std::sync::Arc;
|
||||
|
||||
/// A detected change between two schema versions.
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
@ -225,7 +222,8 @@ fn find_similar_column<'a>(
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use arrow::datatypes::Field;
|
||||
use arrow::datatypes::{Field, Schema};
|
||||
use std::sync::Arc;
|
||||
|
||||
fn schema(fields: Vec<(&str, DataType)>) -> SchemaRef {
|
||||
Arc::new(Schema::new(
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user