mirror of
https://github.com/tokio-rs/axum.git
synced 2025-09-30 22:41:03 +00:00
Use "set up" rather than "setup" when used as a verb
This commit is contained in:
parent
133a4dc32e
commit
d303074379
@ -312,7 +312,7 @@ impl<F> WebSocketUpgrade<F> {
|
|||||||
|
|
||||||
/// Finalize upgrading the connection and call the provided callback with
|
/// Finalize upgrading the connection and call the provided callback with
|
||||||
/// the stream.
|
/// the stream.
|
||||||
#[must_use = "to setup the WebSocket connection, this response must be returned"]
|
#[must_use = "to set up the WebSocket connection, this response must be returned"]
|
||||||
pub fn on_upgrade<C, Fut>(self, callback: C) -> Response
|
pub fn on_upgrade<C, Fut>(self, callback: C) -> Response
|
||||||
where
|
where
|
||||||
C: FnOnce(WebSocket) -> Fut + Send + 'static,
|
C: FnOnce(WebSocket) -> Fut + Send + 'static,
|
||||||
|
@ -66,7 +66,7 @@
|
|||||||
//!
|
//!
|
||||||
//! # Routing
|
//! # Routing
|
||||||
//!
|
//!
|
||||||
//! [`Router`] is used to setup which paths goes to which services:
|
//! [`Router`] is used to set up which paths goes to which services:
|
||||||
//!
|
//!
|
||||||
//! ```rust
|
//! ```rust
|
||||||
//! use axum::{Router, routing::get};
|
//! use axum::{Router, routing::get};
|
||||||
|
@ -38,7 +38,7 @@ async fn main() {
|
|||||||
let db_connection_str = std::env::var("DATABASE_URL")
|
let db_connection_str = std::env::var("DATABASE_URL")
|
||||||
.unwrap_or_else(|_| "postgres://postgres:password@localhost".to_string());
|
.unwrap_or_else(|_| "postgres://postgres:password@localhost".to_string());
|
||||||
|
|
||||||
// setup connection pool
|
// set up connection pool
|
||||||
let pool = PgPoolOptions::new()
|
let pool = PgPoolOptions::new()
|
||||||
.max_connections(5)
|
.max_connections(5)
|
||||||
.acquire_timeout(Duration::from_secs(3))
|
.acquire_timeout(Duration::from_secs(3))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user