Skip to content

Commit f603d34

Browse files
shruti2522alamb
andauthored
Update workspace to use Rust 1.89 (#17100)
Co-authored-by: Andrew Lamb <[email protected]>
1 parent 44daa9a commit f603d34

File tree

43 files changed

+204
-175
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+204
-175
lines changed

datafusion-examples/examples/parquet_index.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ impl Display for ParquetMetadataIndex {
313313
"ParquetMetadataIndex(last_num_pruned: {})",
314314
self.last_num_pruned()
315315
)?;
316-
let batches = pretty_format_batches(&[self.index.clone()]).unwrap();
316+
let batches = pretty_format_batches(std::slice::from_ref(&self.index)).unwrap();
317317
write!(f, "{batches}",)
318318
}
319319
}

datafusion/catalog/src/async.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -737,7 +737,7 @@ mod tests {
737737
] {
738738
let async_provider = MockAsyncCatalogProviderList::default();
739739
let cached_provider = async_provider
740-
.resolve(&[table_ref.clone()], &test_config())
740+
.resolve(std::slice::from_ref(table_ref), &test_config())
741741
.await
742742
.unwrap();
743743

datafusion/catalog/src/cte_worktable.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ impl TableProvider for CteWorkTable {
7171
self
7272
}
7373

74-
fn get_logical_plan(&self) -> Option<Cow<LogicalPlan>> {
74+
fn get_logical_plan(&'_ self) -> Option<Cow<'_, LogicalPlan>> {
7575
None
7676
}
7777

datafusion/catalog/src/default_table_source.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ impl TableSource for DefaultTableSource {
7676
self.table_provider.supports_filters_pushdown(filter)
7777
}
7878

79-
fn get_logical_plan(&self) -> Option<Cow<datafusion_expr::LogicalPlan>> {
79+
fn get_logical_plan(&'_ self) -> Option<Cow<'_, datafusion_expr::LogicalPlan>> {
8080
self.table_provider.get_logical_plan()
8181
}
8282

datafusion/catalog/src/table.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ use datafusion_physical_plan::ExecutionPlan;
4949
/// [`CatalogProvider`]: super::CatalogProvider
5050
#[async_trait]
5151
pub trait TableProvider: Debug + Sync + Send {
52-
/// Returns the table provider as [`Any`](std::any::Any) so that it can be
52+
/// Returns the table provider as [`Any`] so that it can be
5353
/// downcast to a specific implementation.
5454
fn as_any(&self) -> &dyn Any;
5555

@@ -75,7 +75,7 @@ pub trait TableProvider: Debug + Sync + Send {
7575
}
7676

7777
/// Get the [`LogicalPlan`] of this table, if available.
78-
fn get_logical_plan(&self) -> Option<Cow<LogicalPlan>> {
78+
fn get_logical_plan(&'_ self) -> Option<Cow<'_, LogicalPlan>> {
7979
None
8080
}
8181

datafusion/catalog/src/view.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ impl TableProvider for ViewTable {
8787
self
8888
}
8989

90-
fn get_logical_plan(&self) -> Option<Cow<LogicalPlan>> {
90+
fn get_logical_plan(&'_ self) -> Option<Cow<'_, LogicalPlan>> {
9191
Some(Cow::Borrowed(&self.logical_plan))
9292
}
9393

datafusion/common/src/error.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,7 @@ impl DataFusionError {
523523
}
524524
}
525525

526-
pub fn message(&self) -> Cow<str> {
526+
pub fn message(&self) -> Cow<'_, str> {
527527
match *self {
528528
DataFusionError::ArrowError(ref desc, ref backtrace) => {
529529
let backtrace = backtrace.clone().unwrap_or_else(|| "".to_owned());

datafusion/common/src/utils/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ pub fn evaluate_partition_ranges(
260260
/// the identifier by replacing it with two double quotes
261261
///
262262
/// e.g. identifier `tab.le"name` becomes `"tab.le""name"`
263-
pub fn quote_identifier(s: &str) -> Cow<str> {
263+
pub fn quote_identifier(s: &str) -> Cow<'_, str> {
264264
if needs_quotes(s) {
265265
Cow::Owned(format!("\"{}\"", s.replace('"', "\"\"")))
266266
} else {

datafusion/core/src/dataframe/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2425,7 +2425,7 @@ impl TableProvider for DataFrameTableProvider {
24252425
self
24262426
}
24272427

2428-
fn get_logical_plan(&self) -> Option<Cow<LogicalPlan>> {
2428+
fn get_logical_plan(&self) -> Option<Cow<'_, LogicalPlan>> {
24292429
Some(Cow::Borrowed(&self.plan))
24302430
}
24312431

datafusion/core/tests/fuzz_cases/aggregate_fuzz.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ async fn run_aggregate_test(input1: Vec<RecordBatch>, group_by_columns: Vec<&str
320320
.unwrap();
321321

322322
let running_source = DataSourceExec::from_data_source(
323-
MemorySourceConfig::try_new(&[input1.clone()], schema.clone(), None)
323+
MemorySourceConfig::try_new(std::slice::from_ref(&input1), schema.clone(), None)
324324
.unwrap()
325325
.try_with_sort_information(vec![sort_keys.into()])
326326
.unwrap(),

0 commit comments

Comments
 (0)