Skip to content

Commit 755198a

Browse files
committed
Minor documentation tweaks
1 parent af1066d commit 755198a

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

examples/postgres/pooled-with-rustls/src/main.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,8 @@ use std::time::Duration;
1111
async fn main() -> Result<(), Box<dyn std::error::Error>> {
1212
let db_url = std::env::var("DATABASE_URL").expect("Env var `DATABASE_URL` not set");
1313

14-
let config = ManagerConfig {
15-
custom_setup: Box::new(establish_connection),
16-
..ManagerConfig::default()
17-
};
14+
let mut config = ManagerConfig::default();
15+
config.custom_setup = Box::new(establish_connection);
1816

1917
// First we have to construct a connection manager with our custom `establish_connection`
2018
// function

src/async_connection_wrapper.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ pub trait BlockOn {
3030
fn get_runtime() -> Self;
3131
}
3232

33-
/// A helper type that wraps an [`crate::AsyncConnectionWrapper`] to
33+
/// A helper type that wraps an [`AsyncConnection`][crate::AsyncConnection] to
3434
/// provide a sync [`diesel::Connection`] implementation.
3535
///
3636
/// Internally this wrapper type will use `block_on` to wait for

src/pooled_connection/mod.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,10 @@ impl<C: fmt::Debug> fmt::Debug for RecyclingMethod<C> {
8585

8686
/// Configuration object for a Manager.
8787
///
88-
/// This currently only makes it possible to specify which [`RecyclingMethod`]
89-
/// should be used when retrieving existing objects from the [`Pool`].
88+
/// This makes it possible to specify which [`RecyclingMethod`]
89+
/// should be used when retrieving existing objects from the `Pool`
90+
/// and it allows to provide a custom setup function.
91+
#[non_exhaustive]
9092
pub struct ManagerConfig<C> {
9193
/// Method of how a connection is recycled. See [RecyclingMethod].
9294
pub recycling_method: RecyclingMethod<C>,

0 commit comments

Comments
 (0)