Skip to content

Commit

Permalink
Minor documentation tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
weiznich committed Sep 1, 2023
1 parent af1066d commit 755198a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 2 additions & 4 deletions examples/postgres/pooled-with-rustls/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,8 @@ use std::time::Duration;
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let db_url = std::env::var("DATABASE_URL").expect("Env var `DATABASE_URL` not set");

let config = ManagerConfig {
custom_setup: Box::new(establish_connection),
..ManagerConfig::default()
};
let mut config = ManagerConfig::default();
config.custom_setup = Box::new(establish_connection);

// First we have to construct a connection manager with our custom `establish_connection`
// function
Expand Down
2 changes: 1 addition & 1 deletion src/async_connection_wrapper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ pub trait BlockOn {
fn get_runtime() -> Self;
}

/// A helper type that wraps an [`crate::AsyncConnectionWrapper`] to
/// A helper type that wraps an [`AsyncConnection`][crate::AsyncConnection] to
/// provide a sync [`diesel::Connection`] implementation.
///
/// Internally this wrapper type will use `block_on` to wait for
Expand Down
6 changes: 4 additions & 2 deletions src/pooled_connection/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,10 @@ impl<C: fmt::Debug> fmt::Debug for RecyclingMethod<C> {

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

0 comments on commit 755198a

Please sign in to comment.