From 64e1ca92cf614da6ceaf5de3346981873fda9efa Mon Sep 17 00:00:00 2001 From: nameexhaustion Date: Wed, 3 Jul 2024 16:37:57 +1000 Subject: [PATCH] refactor(rust): Remove dead code (#17378) --- crates/polars-core/src/schema.rs | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/crates/polars-core/src/schema.rs b/crates/polars-core/src/schema.rs index f66bc6059fbc..981615499dfb 100644 --- a/crates/polars-core/src/schema.rs +++ b/crates/polars-core/src/schema.rs @@ -446,9 +446,6 @@ pub trait IndexOfSchema: Debug { /// Get a vector of all column names. fn get_names(&self) -> Vec<&str>; - /// Get a vector of (name, dtype) pairs - fn get_names_and_dtypes(&'_ self) -> Vec<(&'_ str, DataType)>; - fn try_index_of(&self, name: &str) -> PolarsResult { self.index_of(name).ok_or_else(|| { polars_err!( @@ -467,13 +464,6 @@ impl IndexOfSchema for Schema { fn get_names(&self) -> Vec<&str> { self.iter_names().map(|name| name.as_str()).collect() } - - fn get_names_and_dtypes(&'_ self) -> Vec<(&'_ str, DataType)> { - self.inner - .iter() - .map(|(name, dtype)| (name.as_str(), dtype.clone())) - .collect() - } } impl IndexOfSchema for ArrowSchema { @@ -484,13 +474,6 @@ impl IndexOfSchema for ArrowSchema { fn get_names(&self) -> Vec<&str> { self.fields.iter().map(|f| f.name.as_str()).collect() } - - fn get_names_and_dtypes(&'_ self) -> Vec<(&'_ str, DataType)> { - self.fields - .iter() - .map(|x| (x.name.as_str(), DataType::from_arrow(&x.data_type, true))) - .collect() - } } pub trait SchemaNamesAndDtypes {