Repository: apache/arrow-rs
Pull request #6792 (2024-11-25 17:35:48)

Remove unused dependencies
# Which issue does this PR close?

None

# Rationale for this change
 
Removing the deps speeds the compilation up

# What changes are included in this PR?

cargo.toml pruning

# Are there any user-facing changes?


no



Patch:
diff --git a/arrow-arith/Cargo.toml b/arrow-arith/Cargo.toml
index d2ee0b9e2..66696df8a 100644
--- a/arrow-arith/Cargo.toml
+++ b/arrow-arith/Cargo.toml
@@ -39,7 +39,6 @@ arrow-buffer = { workspace = true }
 arrow-data = { workspace = true }
 arrow-schema = { workspace = true }
 chrono = { workspace = true }
-half = { version = "2.1", default-features = false }
 num = { version = "0.4", default-features = false, features = ["std"] }
 
 [dev-dependencies]
diff --git a/arrow-avro/Cargo.toml b/arrow-avro/Cargo.toml
index d2436f0c1..c82bf0113 100644
--- a/arrow-avro/Cargo.toml
+++ b/arrow-avro/Cargo.toml
@@ -39,10 +39,6 @@ deflate = ["flate2"]
 snappy = ["snap", "crc"]
 
 [dependencies]
-arrow-array = { workspace = true  }
-arrow-buffer = { workspace = true  }
-arrow-cast = { workspace = true  }
-arrow-data = { workspace = true  }
 arrow-schema = { workspace = true  }
 serde_json = { version = "1.0", default-features = false, features = ["std"] }
 serde = { version = "1.0.188", features = ["derive"] }
diff --git a/arrow-csv/Cargo.toml b/arrow-csv/Cargo.toml
index be213c936..4729779c4 100644
--- a/arrow-csv/Cargo.toml
+++ b/arrow-csv/Cargo.toml
@@ -37,13 +37,11 @@ bench = false
 arrow-array = { workspace = true }
 arrow-buffer = { workspace = true }
 arrow-cast = { workspace = true }
-arrow-data = { workspace = true }
 arrow-schema = { workspace = true }
 chrono = { workspace = true }
 csv = { version = "1.1", default-features = false }
 csv-core = { version = "0.1" }
 lazy_static = { version = "1.4", default-features = false }
-lexical-core = { version = "1.0", default-features = false }
 regex = { version = "1.7.0", default-features = false, features = ["std", "unicode", "perf"] }
 
 [dev-dependencies]
diff --git a/arrow-flight/gen/Cargo.toml b/arrow-flight/gen/Cargo.toml
index b5ed0cea4..ccd32b433 100644
--- a/arrow-flight/gen/Cargo.toml
+++ b/arrow-flight/gen/Cargo.toml
@@ -32,6 +32,5 @@ publish = false
 [dependencies]
 # Pin specific version of the tonic-build dependencies to avoid auto-generated
 # (and checked in) arrow.flight.protocol.rs from changing
-proc-macro2 = { version = "=1.0.92", default-features = false }
 prost-build = { version = "=0.13.3", default-features = false }
 tonic-build = { version = "=0.12.3", default-features = false, features = ["transport", "prost"] }
diff --git a/arrow-ipc/Cargo.toml b/arrow-ipc/Cargo.toml
index 94b89a55f..cf91b3a34 100644
--- a/arrow-ipc/Cargo.toml
+++ b/arrow-ipc/Cargo.toml
@@ -36,7 +36,6 @@ bench = false
 [dependencies]
 arrow-array = { workspace = true }
 arrow-buffer = { workspace = true }
-arrow-cast = { workspace = true }
 arrow-data = { workspace = true }
 arrow-schema = { workspace = true }
 flatbuffers = { version = "24.3.25", default-features = false }
diff --git a/arrow-json/Cargo.toml b/arrow-json/Cargo.toml
index 517bb03d2..564cb9433 100644
--- a/arrow-json/Cargo.toml
+++ b/arrow-json/Cargo.toml
@@ -48,7 +48,6 @@ chrono = { workspace = true }
 lexical-core = { version = "1.0", default-features = false}
 
 [dev-dependencies]
-tempfile = "3.3"
 flate2 = { version = "1", default-features = false, features = ["rust_backend"] }
 serde = { version = "1.0", default-features = false, features = ["derive"] }
 futures = "0.3"
diff --git a/arrow-ord/Cargo.toml b/arrow-ord/Cargo.toml
index c9c30074f..a2894c020 100644
--- a/arrow-ord/Cargo.toml
+++ b/arrow-ord/Cargo.toml
@@ -39,7 +39,6 @@ arrow-buffer = { workspace = true }
 arrow-data = { workspace = true }
 arrow-schema = { workspace = true }
 arrow-select = { workspace = true }
-num = { version = "0.4", default-features = false, features = ["std"] }
 half = { version = "2.1", default-features = false, features = ["num-traits"] }
 
 [dev-dependencies]
diff --git a/arrow-ord/src/ord.rs b/arrow-ord/src/ord.rs
index 547422b40..55e397cd8 100644
--- a/arrow-ord/src/ord.rs
+++ b/arrow-ord/src/ord.rs
@@ -394,7 +394,7 @@ pub fn make_comparator(
 }
 
 #[cfg(test)]
-pub mod tests {
+mod tests {
     use super::*;
     use arrow_array::builder::{Int32Builder, ListBuilder};
     use arrow_buffer::{i256, IntervalDayTime, OffsetBuffer};
diff --git a/arrow/Cargo.toml b/arrow/Cargo.toml
index 732819cf0..32b2384af 100644
--- a/arrow/Cargo.toml
+++ b/arrow/Cargo.toml
@@ -87,7 +87,6 @@ chrono = { workspace = true }
 criterion = { version = "0.5", default-features = false }
 half = { version = "2.1", default-features = false }
 rand = { version = "0.8", default-features = false, features = ["std", "std_rng"] }
-tempfile = { version = "3", default-features = false }
 serde = { version = "1.0", default-features = false, features = ["derive"] }
 
 [build-dependencies]
diff --git a/object_store/src/aws/client.rs b/object_store/src/aws/client.rs
index b19e0e2ab..51c917723 100644
--- a/object_store/src/aws/client.rs
+++ b/object_store/src/aws/client.rs
@@ -246,7 +246,7 @@ struct SessionCredential<'a> {
     config: &'a S3Config,
 }
 
-impl<'a> SessionCredential<'a> {
+impl SessionCredential<'_> {
     fn authorizer(&self) -> Option<AwsAuthorizer<'_>> {
         let mut authorizer =
             AwsAuthorizer::new(self.credential.as_deref()?, "s3", &self.config.region)
diff --git a/object_store/src/aws/dynamo.rs b/object_store/src/aws/dynamo.rs
index ece3b8a35..6283e76c1 100644
--- a/object_store/src/aws/dynamo.rs
+++ b/object_store/src/aws/dynamo.rs
@@ -471,7 +471,7 @@ enum ReturnValues {
 /// This provides cheap, ordered serialization of maps
 struct Map<'a, K, V>(&'a [(K, V)]);
 
-impl<'a, K: Serialize, V: Serialize> Serialize for Map<'a, K, V> {
+impl<K: Serialize, V: Serialize> Serialize for Map<'_, K, V> {
     fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
     where
         S: Serializer,
diff --git a/object_store/src/local.rs b/object_store/src/local.rs
index 11324b1e5..78fce9c26 100644
--- a/object_store/src/local.rs
+++ b/object_store/src/local.rs
@@ -1004,7 +1004,7 @@ fn get_inode(metadata: &Metadata) -> u64 {
 
 #[cfg(not(unix))]
 /// On platforms where an inode isn't available, fallback to just relying on size and mtime
-fn get_inode(metadata: &Metadata) -> u64 {
+fn get_inode(_metadata: &Metadata) -> u64 {
     0
 }
 
@@ -1060,7 +1060,10 @@ mod tests {
     use std::fs;
 
     use futures::TryStreamExt;
-    use tempfile::{NamedTempFile, TempDir};
+    use tempfile::TempDir;
+
+    #[cfg(target_family = "unix")]
+    use tempfile::NamedTempFile;
 
     use crate::integration::*;
 
@@ -1248,6 +1251,7 @@ mod tests {
         fs.list_with_delimiter(None).await.unwrap();
     }
 
+    #[cfg(target_family = "unix")]
     async fn check_list(integration: &LocalFileSystem, prefix: Option<&Path>, expected: &[&str]) {
         let result: Vec<_> = integration.list(prefix).try_collect().await.unwrap();
 
diff --git a/object_store/src/path/parts.rs b/object_store/src/path/parts.rs
index df7097cbe..de2e1a75c 100644
--- a/object_store/src/path/parts.rs
+++ b/object_store/src/path/parts.rs
@@ -126,7 +126,7 @@ impl From<String> for PathPart<'static> {
     }
 }
 
-impl<'a> AsRef<str> for PathPart<'a> {
+impl AsRef<str> for PathPart<'_> {
     fn as_ref(&self) -> &str {
         self.raw.as_ref()
     }
diff --git a/parquet/src/arrow/async_reader/mod.rs b/parquet/src/arrow/async_reader/mod.rs
index aaa60fc59..c408456df 100644
--- a/parquet/src/arrow/async_reader/mod.rs
+++ b/parquet/src/arrow/async_reader/mod.rs
@@ -159,7 +159,7 @@ pub trait AsyncFileReader: Send {
 }
 
 /// This allows Box<dyn AsyncFileReader + '_> to be used as an AsyncFileReader,
-impl<'reader> AsyncFileReader for Box<dyn AsyncFileReader + 'reader> {
+impl AsyncFileReader for Box<dyn AsyncFileReader + '_> {
     fn get_bytes(&mut self, range: Range<usize>) -> BoxFuture<'_, Result<Bytes>> {
         self.as_mut().get_bytes(range)
     }
diff --git a/parquet/src/arrow/async_writer/mod.rs b/parquet/src/arrow/async_writer/mod.rs
index 5695fd216..c04d5710a 100644
--- a/parquet/src/arrow/async_writer/mod.rs
+++ b/parquet/src/arrow/async_writer/mod.rs
@@ -89,7 +89,7 @@ pub trait AsyncFileWriter: Send {
     fn complete(&mut self) -> BoxFuture<'_, Result<()>>;
 }
 
-impl<'writer> AsyncFileWriter for Box<dyn AsyncFileWriter + 'writer> {
+impl AsyncFileWriter for Box<dyn AsyncFileWriter + '_> {
     fn write(&mut self, bs: Bytes) -> BoxFuture<'_, Result<()>> {
         self.as_mut().write(bs)
     }


Test patch:
diff --git a/arrow-integration-testing/Cargo.toml b/arrow-integration-testing/Cargo.toml
index 7be56d919..0ebbc05a8 100644
--- a/arrow-integration-testing/Cargo.toml
+++ b/arrow-integration-testing/Cargo.toml
@@ -41,14 +41,12 @@ arrow-integration-test = { path = "../arrow-integration-test", default-features
 async-trait = { version = "0.1.41", default-features = false }
 clap = { version = "4", default-features = false, features = ["std", "derive", "help", "error-context", "usage"] }
 futures = { version = "0.3", default-features = false }
-hex = { version = "0.4", default-features = false, features = ["std"] }
 prost = { version = "0.13", default-features = false }
 serde = { version = "1.0", default-features = false, features = ["rc", "derive"] }
 serde_json = { version = "1.0", default-features = false, features = ["std"] }
 tokio = { version = "1.0", default-features = false }
 tonic = { version = "0.12", default-features = false }
 tracing-subscriber = { version = "0.3.1", default-features = false, features = ["fmt"], optional = true }
-num = { version = "0.4", default-features = false, features = ["std"] }
 flate2 = { version = "1", default-features = false, features = ["rust_backend"] }
 
 [dev-dependencies]