Skip to content

Commit 46ce093

Browse files
committed
Fix tests for SyncWrapper
1 parent ea92af7 commit 46ce093

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

sync/Cargo.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,7 @@ readme = "README.md"
1515
[dependencies]
1616
deadpool-runtime = { version = "0.1.2", path = "../runtime" }
1717
tracing = { version = "0.1", optional = true }
18+
19+
[dev-dependencies]
20+
deadpool = { version = "0.12", path = ".." }
21+
tokio = { version = "1.38.0", features = ["macros", "rt-multi-thread"] }

sync/tests/sync.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
#![cfg(feature = "managed")]
2-
3-
use deadpool::{Manager, Pool, RecycleResult};
1+
use deadpool::managed::{Manager, Metrics, Pool, RecycleResult};
42
use deadpool_runtime::Runtime;
53
use deadpool_sync::SyncWrapper;
64

@@ -18,7 +16,11 @@ impl Manager for ComputerManager {
1816
SyncWrapper::new(Runtime::Tokio1, || Ok(Computer { answer: 42 })).await
1917
}
2018

21-
async fn recycle(&self, _: &mut Self::Type) -> RecycleResult<Self::Error> {
19+
async fn recycle(
20+
&self,
21+
_obj: &mut Self::Type,
22+
_metrics: &Metrics,
23+
) -> RecycleResult<Self::Error> {
2224
Ok(())
2325
}
2426
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy