Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 6a8d949

Browse filesBrowse files
committed
up rbdc version
1 parent f492998 commit 6a8d949
Copy full SHA for 6a8d949

File tree

Expand file treeCollapse file tree

1 file changed

+4
-6
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+4
-6
lines changed

‎example/src/custom_pool.rs

Copy file name to clipboardExpand all lines: example/src/custom_pool.rs
+4-6Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,13 @@ mod my_pool {
3636
use futures_core::future::BoxFuture;
3737
use rbatis::async_trait;
3838
use rbatis::rbdc::db::{Connection, ExecResult, Row};
39-
use rbatis::rbdc::pool::conn_box::ConnectionBox;
40-
use rbatis::rbdc::pool::conn_manager::ConnManager;
41-
use rbatis::rbdc::pool::Pool;
4239
use rbatis::rbdc::{db, Error};
4340
use rbs::value::map::ValueMap;
4441
use rbs::{to_value, Value};
4542
use std::borrow::Cow;
4643
use std::fmt::{Debug, Formatter};
4744
use std::time::Duration;
45+
use rbatis::rbdc::pool::{ConnectionGuard, ConnectionManager, Pool};
4846

4947
pub struct DeadPool {
5048
pub manager: ConnManagerProxy,
@@ -70,7 +68,7 @@ mod my_pool {
7068

7169
#[async_trait]
7270
impl Pool for DeadPool {
73-
fn new(manager: ConnManager) -> Result<Self, Error>
71+
fn new(manager: ConnectionManager) -> Result<Self, Error>
7472
where
7573
Self: Sized,
7674
{
@@ -145,12 +143,12 @@ mod my_pool {
145143
}
146144

147145
pub struct ConnManagerProxy {
148-
pub inner: ConnManager,
146+
pub inner: ConnectionManager,
149147
pub conn: Option<Object<ConnManagerProxy>>,
150148
}
151149

152150
impl deadpool::managed::Manager for ConnManagerProxy {
153-
type Type = ConnectionBox;
151+
type Type = ConnectionGuard;
154152

155153
type Error = Error;
156154

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.