1
0
mirror of https://github.com/actix/examples synced 2024-11-30 17:14:35 +01:00

Fix error message for failed connection (#144)

This commit is contained in:
Niels Nielsen 2019-06-22 09:08:45 +02:00 committed by Nikolay Kim
parent 733eb93a97
commit b0d3c652b2

View File

@ -14,7 +14,7 @@ pub fn init_pool(database_url: &str) -> Result<PgPool, PoolError> {
} }
fn get_conn(pool: &PgPool) -> Result<PgPooledConnection, &'static str> { fn get_conn(pool: &PgPool) -> Result<PgPooledConnection, &'static str> {
pool.get().map_err(|_| "can get connection") pool.get().map_err(|_| "Can't get connection")
} }
pub fn get_all_tasks(pool: &PgPool) -> Result<Vec<Task>, &'static str> { pub fn get_all_tasks(pool: &PgPool) -> Result<Vec<Task>, &'static str> {