Skip to content

Commit c7a4e56

Browse files
author
Joshua Nelson
committed
Add compatibility with 1.34 in test suite
Previously, this moved values into match guards, which was only recently allowed. See rust-lang/rust#63118 for more details. Note that this does _not_ allow the test suite to be run with 1.34, since its dependencies use features that were not stable in 1.34.
1 parent 19f3641 commit c7a4e56

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/simple_api/mod.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2449,8 +2449,8 @@ pub(crate) mod tests {
24492449
Ok(TransactionStatus::Ok)
24502450
}
24512451
let err = call_forever(YDB_NOTTP).unwrap_err();
2452-
match err.downcast::<YDBError>() {
2453-
Ok(err) if err.status == craw::YDB_ERR_TPTOODEEP => {}
2452+
match &err.downcast::<YDBError>() {
2453+
Ok(ydb_err) if ydb_err.status == craw::YDB_ERR_TPTOODEEP => {}
24542454
other => panic!("expected ERR_TPTOODEEP, got {:?}", other),
24552455
}
24562456

@@ -2648,10 +2648,10 @@ pub(crate) mod tests {
26482648
fn no_invalid_errors_proptest(key in arb_key(), value: Vec<u8>, b: bool) {
26492649
fn assert_not_invalid<T>(res: YDBResult<T>) {
26502650
match res {
2651-
Err(ydberr) if ydberr.status == YDB_ERR_INVSTRLEN => {
2651+
Err(YDBError { status: YDB_ERR_INVSTRLEN, .. }) => {
26522652
panic!("function returned YDB_ERR_INVSTRLEN");
26532653
}
2654-
Err(ydberr) if ydberr.status == YDB_ERR_INSUFFSUBS => {
2654+
Err(YDBError { status: YDB_ERR_INSUFFSUBS, .. }) => {
26552655
panic!("function returned YDB_ERR_INVSTRLEN");
26562656
}
26572657
_ => {}

0 commit comments

Comments
 (0)