Skip to content

Commit 3750dc9

Browse files
authored
Bump MSRV to 1.82, toolchain to 1.85 (apache#14811)
* Bump MSRV to 1.82, toolchain to 1.85 * Fix some clippy warnings * Fix more clippy warnings
1 parent 9ca09cf commit 3750dc9

File tree

6 files changed

+10
-13
lines changed

6 files changed

+10
-13
lines changed

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ homepage = "https://datafusion.apache.org"
6666
license = "Apache-2.0"
6767
readme = "README.md"
6868
repository = "https://github.com/apache/datafusion"
69-
rust-version = "1.81.0"
69+
rust-version = "1.82.0"
7070
version = "45.0.0"
7171

7272
[workspace.dependencies]

datafusion/common/src/table_reference.rs

+3-4
Original file line numberDiff line numberDiff line change
@@ -193,17 +193,16 @@ impl TableReference {
193193
match self {
194194
TableReference::Bare { table } => **table == *other.table(),
195195
TableReference::Partial { schema, table } => {
196-
**table == *other.table()
197-
&& other.schema().map_or(true, |s| *s == **schema)
196+
**table == *other.table() && other.schema().is_none_or(|s| *s == **schema)
198197
}
199198
TableReference::Full {
200199
catalog,
201200
schema,
202201
table,
203202
} => {
204203
**table == *other.table()
205-
&& other.schema().map_or(true, |s| *s == **schema)
206-
&& other.catalog().map_or(true, |c| *c == **catalog)
204+
&& other.schema().is_none_or(|s| *s == **schema)
205+
&& other.catalog().is_none_or(|c| *c == **catalog)
207206
}
208207
}
209208
}

datafusion/expr/src/utils.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -832,7 +832,7 @@ pub fn exprlist_len(
832832
.enumerate()
833833
.filter_map(|(idx, field)| {
834834
let (maybe_table_ref, _) = schema.qualified_field(idx);
835-
if maybe_table_ref.map_or(true, |q| q == qualifier) {
835+
if maybe_table_ref.is_none_or(|q| q == qualifier) {
836836
Some((maybe_table_ref.cloned(), Arc::clone(field)))
837837
} else {
838838
None

datafusion/physical-expr-common/src/sort_expr.rs

+3-5
Original file line numberDiff line numberDiff line change
@@ -172,13 +172,11 @@ impl PhysicalSortExpr {
172172
let nullable = self.expr.nullable(schema).unwrap_or(true);
173173
self.expr.eq(&requirement.expr)
174174
&& if nullable {
175-
requirement
176-
.options
177-
.map_or(true, |opts| self.options == opts)
175+
requirement.options.is_none_or(|opts| self.options == opts)
178176
} else {
179177
requirement
180178
.options
181-
.map_or(true, |opts| self.options.descending == opts.descending)
179+
.is_none_or(|opts| self.options.descending == opts.descending)
182180
}
183181
}
184182
}
@@ -293,7 +291,7 @@ impl PhysicalSortRequirement {
293291
self.expr.eq(&other.expr)
294292
&& other
295293
.options
296-
.map_or(true, |other_opts| self.options == Some(other_opts))
294+
.is_none_or(|other_opts| self.options == Some(other_opts))
297295
}
298296

299297
#[deprecated(since = "43.0.0", note = "use LexRequirement::from_lex_ordering")]

datafusion/physical-expr/src/equivalence/properties.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -640,7 +640,7 @@ impl EquivalenceProperties {
640640
req.expr.eq(&existing.expr)
641641
&& req
642642
.options
643-
.map_or(true, |req_opts| req_opts == existing.options)
643+
.is_none_or(|req_opts| req_opts == existing.options)
644644
},
645645
)
646646
})

rust-toolchain.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,5 @@
1919
# to compile this workspace and run CI jobs.
2020

2121
[toolchain]
22-
channel = "1.84.1"
22+
channel = "1.85.0"
2323
components = ["rustfmt", "clippy"]

0 commit comments

Comments
 (0)