Skip to content

Commit 488b024

Browse files
randyliJefffrey
andauthored
chore: bump workspace rust version to 1.91.0 (#18422)
## Which issue does this PR close? - Closes #18396 ## Rationale for this change ## What changes are included in this PR? - Bumps version in rust-toolchain.toml - Fixes clippy errors ## Are these changes tested? N/A ## Are there any user-facing changes? N/A --------- Co-authored-by: Jeffrey Vo <[email protected]>
1 parent d445b61 commit 488b024

File tree

24 files changed

+45
-64
lines changed

24 files changed

+45
-64
lines changed

datafusion/common/src/pyarrow.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ mod tests {
126126
fn test_roundtrip() {
127127
init_python();
128128

129-
let example_scalars = vec![
129+
let example_scalars = [
130130
ScalarValue::Boolean(Some(true)),
131131
ScalarValue::Int32(Some(23)),
132132
ScalarValue::Float64(Some(12.34)),

datafusion/common/src/scalar/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8693,7 +8693,7 @@ mod tests {
86938693
])),
86948694
true,
86958695
));
8696-
let scalars = vec![
8696+
let scalars = [
86978697
ScalarValue::try_new_null(&DataType::List(Arc::clone(&field_ref))).unwrap(),
86988698
ScalarValue::try_new_null(&DataType::LargeList(Arc::clone(&field_ref)))
86998699
.unwrap(),

datafusion/core/src/dataframe/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -983,7 +983,7 @@ impl DataFrame {
983983
}));
984984

985985
//collect recordBatch
986-
let describe_record_batch = vec![
986+
let describe_record_batch = [
987987
// count aggregation
988988
self.clone().aggregate(
989989
vec![],

datafusion/core/src/execution/session_state_defaults.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ impl SessionStateDefaults {
101101
expr_planners
102102
}
103103

104-
/// returns the list of default [`ScalarUDF']'s
104+
/// returns the list of default [`ScalarUDF`]s
105105
pub fn default_scalar_functions() -> Vec<Arc<ScalarUDF>> {
106106
#[cfg_attr(not(feature = "nested_expressions"), allow(unused_mut))]
107107
let mut functions: Vec<Arc<ScalarUDF>> = functions::all_default_functions();
@@ -112,12 +112,12 @@ impl SessionStateDefaults {
112112
functions
113113
}
114114

115-
/// returns the list of default [`AggregateUDF']'s
115+
/// returns the list of default [`AggregateUDF`]s
116116
pub fn default_aggregate_functions() -> Vec<Arc<AggregateUDF>> {
117117
functions_aggregate::all_default_aggregate_functions()
118118
}
119119

120-
/// returns the list of default [`WindowUDF']'s
120+
/// returns the list of default [`WindowUDF`]s
121121
pub fn default_window_functions() -> Vec<Arc<WindowUDF>> {
122122
functions_window::all_default_window_functions()
123123
}
@@ -127,7 +127,7 @@ impl SessionStateDefaults {
127127
functions_table::all_default_table_functions()
128128
}
129129

130-
/// returns the list of default [`FileFormatFactory']'s
130+
/// returns the list of default [`FileFormatFactory`]s
131131
pub fn default_file_formats() -> Vec<Arc<dyn FileFormatFactory>> {
132132
let file_formats: Vec<Arc<dyn FileFormatFactory>> = vec![
133133
#[cfg(feature = "parquet")]

datafusion/core/tests/fuzz_cases/equivalence/projection.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ fn project_orderings_random() -> Result<()> {
5858
Operator::Plus,
5959
col("b", &test_schema)?,
6060
)) as Arc<dyn PhysicalExpr>;
61-
let proj_exprs = vec![
61+
let proj_exprs = [
6262
(col("a", &test_schema)?, "a_new"),
6363
(col("b", &test_schema)?, "b_new"),
6464
(col("c", &test_schema)?, "c_new"),
@@ -132,7 +132,7 @@ fn ordering_satisfy_after_projection_random() -> Result<()> {
132132
Operator::Plus,
133133
col("b", &test_schema)?,
134134
)) as Arc<dyn PhysicalExpr>;
135-
let proj_exprs = vec![
135+
let proj_exprs = [
136136
(col("a", &test_schema)?, "a_new"),
137137
(col("b", &test_schema)?, "b_new"),
138138
(col("c", &test_schema)?, "c_new"),

datafusion/core/tests/optimizer/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ fn test_nested_schema_nullability() {
287287

288288
#[test]
289289
fn test_inequalities_non_null_bounded() {
290-
let guarantees = vec![
290+
let guarantees = [
291291
// x ∈ [1, 3] (not null)
292292
(
293293
col("x"),

datafusion/datasource/src/file_stream.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -338,19 +338,15 @@ pub type FileOpenFuture =
338338
BoxFuture<'static, Result<BoxStream<'static, Result<RecordBatch>>>>;
339339

340340
/// Describes the behavior of the `FileStream` if file opening or scanning fails
341+
#[derive(Default)]
341342
pub enum OnError {
342343
/// Fail the entire stream and return the underlying error
344+
#[default]
343345
Fail,
344346
/// Continue scanning, ignoring the failed file
345347
Skip,
346348
}
347349

348-
impl Default for OnError {
349-
fn default() -> Self {
350-
Self::Fail
351-
}
352-
}
353-
354350
/// Generic API for opening a file using an [`ObjectStore`] and resolving to a
355351
/// stream of [`RecordBatch`]
356352
///

datafusion/execution/src/disk_manager.rs

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -98,10 +98,11 @@ impl DiskManagerBuilder {
9898
}
9999
}
100100

101-
#[derive(Clone, Debug)]
101+
#[derive(Clone, Debug, Default)]
102102
pub enum DiskManagerMode {
103103
/// Create a new [DiskManager] that creates temporary files within
104104
/// a temporary directory chosen by the OS
105+
#[default]
105106
OsTmpDirectory,
106107

107108
/// Create a new [DiskManager] that creates temporary files within
@@ -113,21 +114,17 @@ pub enum DiskManagerMode {
113114
Disabled,
114115
}
115116

116-
impl Default for DiskManagerMode {
117-
fn default() -> Self {
118-
Self::OsTmpDirectory
119-
}
120-
}
121-
122117
/// Configuration for temporary disk access
118+
#[allow(deprecated)]
123119
#[deprecated(since = "48.0.0", note = "Use DiskManagerBuilder instead")]
124-
#[derive(Debug, Clone)]
120+
#[derive(Debug, Clone, Default)]
125121
pub enum DiskManagerConfig {
126122
/// Use the provided [DiskManager] instance
127123
Existing(Arc<DiskManager>),
128124

129125
/// Create a new [DiskManager] that creates temporary files within
130126
/// a temporary directory chosen by the OS
127+
#[default]
131128
NewOs,
132129

133130
/// Create a new [DiskManager] that creates temporary files within
@@ -138,13 +135,6 @@ pub enum DiskManagerConfig {
138135
Disabled,
139136
}
140137

141-
#[allow(deprecated)]
142-
impl Default for DiskManagerConfig {
143-
fn default() -> Self {
144-
Self::NewOs
145-
}
146-
}
147-
148138
#[allow(deprecated)]
149139
impl DiskManagerConfig {
150140
/// Create temporary files in a temporary directory chosen by the OS

datafusion/expr/src/expr_rewriter/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,7 @@ mod test {
434434
vec![Some("tableC".into()), Some("tableC".into())],
435435
vec!["f", "ff"],
436436
);
437-
let schemas = vec![schema_c, schema_f, schema_b, schema_a];
437+
let schemas = [schema_c, schema_f, schema_b, schema_a];
438438
let schemas = schemas.iter().collect::<Vec<_>>();
439439

440440
let normalized_expr =

datafusion/expr/src/udwf.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ pub trait WindowUDFImpl: Debug + DynEq + DynHash + Send + Sync {
355355
/// optimizations manually for specific UDFs.
356356
///
357357
/// Example:
358-
/// [`advanced_udwf.rs`]: <https://github.com/apache/arrow-datafusion/blob/main/datafusion-examples/examples/advanced_udwf.rs>
358+
/// `advanced_udwf.rs`: <https://github.com/apache/arrow-datafusion/blob/main/datafusion-examples/examples/advanced_udwf.rs>
359359
///
360360
/// # Returns
361361
/// [None] if simplify is not defined or,

0 commit comments

Comments
 (0)