Skip to content

Commit d33e764

Browse files
committed
treewide: Remove option_result_contains feature
Per rust-lang/rust#62358, this feature has been removed. To prepare for a future nightly toolchain bump, this replaces all the places we're using Option::contains with `iter().any(...)`. Change-Id: Idd507bdc9b35415061e3b7b8b37cc98bbb980c77 Reviewed-on: https://gerrit.readyset.name/c/readyset/+/4612 Tested-by: Buildkite CI Reviewed-by: Dan Wilbanks <[email protected]>
1 parent bbec7d4 commit d33e764

File tree

4 files changed

+12
-6
lines changed

4 files changed

+12
-6
lines changed

readyset-dataflow/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
binary_heap_retain,
1010
trait_alias,
1111
btree_drain_filter,
12-
option_result_contains,
1312
bound_as_ref,
1413
bound_map,
1514
stmt_expr_attributes,

readyset-dataflow/src/ops/paginate.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,9 @@ impl<'op, 'state> PartialEq for CurrentRecord<'op, 'state> {
5757

5858
impl<'op, 'state> PartialEq<[DfValue]> for CurrentRecord<'op, 'state> {
5959
fn eq(&self, other: &[DfValue]) -> bool {
60-
self.partial_cmp(other).contains(&Ordering::Equal)
60+
self.partial_cmp(other)
61+
.iter()
62+
.any(|c| *c == Ordering::Equal)
6163
}
6264
}
6365

readyset-dataflow/src/ops/topk.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,9 @@ impl<'topk, 'state> PartialEq for CurrentRecord<'topk, 'state> {
5858

5959
impl<'topk, 'state> PartialEq<[DfValue]> for CurrentRecord<'topk, 'state> {
6060
fn eq(&self, other: &[DfValue]) -> bool {
61-
self.partial_cmp(other).contains(&Ordering::Equal)
61+
self.partial_cmp(other)
62+
.iter()
63+
.any(|c| *c == Ordering::Equal)
6264
}
6365
}
6466

readyset-server/tests/config_backwards_compatibility.rs

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#![feature(option_result_contains)]
2-
31
use std::ffi::OsStr;
42

53
use include_dir::{include_dir, Dir};
@@ -10,7 +8,12 @@ const CONFIG_VERSIONS: Dir = include_dir!("tests/config_versions");
108
#[test]
119
fn deserialize_old_versions() {
1210
for file in CONFIG_VERSIONS.files() {
13-
if !file.path().extension().contains(&OsStr::new("json")) {
11+
if !file
12+
.path()
13+
.extension()
14+
.iter()
15+
.any(|ext| *ext == OsStr::new("json"))
16+
{
1417
continue;
1518
}
1619

0 commit comments

Comments
 (0)