Skip to content

Commit 4d38e3b

Browse files
committed
chore(clippy): fix clippy issues
1 parent 4ae4a63 commit 4d38e3b

3 files changed

Lines changed: 13 additions & 4 deletions

File tree

type-bridge-core/crates/orm/tests/common/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -331,6 +331,7 @@ pub struct RecordingHook {
331331
}
332332

333333
impl RecordingHook {
334+
#[allow(clippy::type_complexity)]
334335
pub fn new() -> (Self, Arc<Mutex<Vec<(String, CrudOperation)>>>) {
335336
let calls = Arc::new(Mutex::new(Vec::new()));
336337
(

type-bridge-core/crates/orm/tests/integration_tests.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ async fn query_builder_with_sort_and_limit() {
309309
let results = manager
310310
.query()
311311
.filter(Expr::contains("name", "Sort"))
312-
.sort("age", SortDirection::Asc)
312+
.order_by("age", SortDir::Asc)
313313
.limit(2)
314314
.execute()
315315
.await
@@ -341,11 +341,13 @@ async fn transaction_context_batch_commit() {
341341
let iids = manager.insert_many(&mut people).await.expect("insert_many failed");
342342
assert_eq!(iids.len(), 2);
343343

344-
// Fetch all and verify
344+
// Fetch all and verify using query builder with contains
345345
let results = manager
346-
.get(&[Filter::contains("name", "TxBatch")])
346+
.query()
347+
.filter(Expr::contains("name", "TxBatch"))
348+
.execute()
347349
.await
348-
.expect("get after batch failed");
350+
.expect("query after batch failed");
349351
assert_eq!(results.len(), 2);
350352

351353
// Cleanup

type-bridge-core/crates/server/src/test_helpers.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,12 @@ pub struct MockExecutor {
6060
pub connected: Arc<Mutex<bool>>,
6161
}
6262

63+
impl Default for MockExecutor {
64+
fn default() -> Self {
65+
Self::new()
66+
}
67+
}
68+
6369
impl MockExecutor {
6470
pub fn new() -> Self {
6571
Self {

0 commit comments

Comments
 (0)