Skip to content

Commit 2f6c85f

Browse files
committed
fix compilation error
Signed-off-by: Otto Westerlund <westerlundotto@gmail.com>
1 parent d07e80f commit 2f6c85f

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

tests/sync_transaction_tests.rs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,15 +51,13 @@ fn test_sync_client_new_inside_async_context() {
5151
Config::default().with_default_keyspace(),
5252
);
5353

54-
// Should return an error, not panic
55-
assert!(result.is_err());
56-
5754
// Verify the error type is correct
58-
match result.unwrap_err() {
59-
tikv_client::Error::NestedRuntimeError(_) => {
55+
match result {
56+
Err(tikv_client::Error::NestedRuntimeError(_)) => {
6057
// Expected case - test passes
6158
}
62-
other => panic!("Expected NestedRuntimeError, got: {:?}", other),
59+
Err(other) => panic!("Expected NestedRuntimeError, got: {:?}", other),
60+
Ok(_) => panic!("Expected error but got Ok"),
6361
}
6462
});
6563
}

0 commit comments

Comments
 (0)