mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-11-01 11:06:50 +08:00
chore: add lints in workspace cargo config (#223)
This commit is contained in:
@ -1,4 +1,3 @@
|
||||
use async_bb8_diesel::ConnectionManager;
|
||||
use bb8::PooledConnection;
|
||||
use diesel::PgConnection;
|
||||
|
||||
@ -27,7 +26,9 @@ pub async fn diesel_make_pg_pool(database: &Database, _test_transaction: bool) -
|
||||
}
|
||||
|
||||
#[allow(clippy::expect_used)]
|
||||
pub async fn pg_connection(pool: &PgPool) -> PooledConnection<ConnectionManager<PgConnection>> {
|
||||
pub async fn pg_connection(
|
||||
pool: &PgPool,
|
||||
) -> PooledConnection<'_, async_bb8_diesel::ConnectionManager<PgConnection>> {
|
||||
pool.get()
|
||||
.await
|
||||
.expect("Couldn't retrieve PostgreSQL connection")
|
||||
|
||||
@ -100,7 +100,10 @@ async fn drainer(
|
||||
macro_util::handle_resp!(a.orig.update(&conn, a.update_data).await, "up", "ref")
|
||||
}
|
||||
},
|
||||
kv::DBOperation::Delete => todo!(),
|
||||
kv::DBOperation::Delete => {
|
||||
// TODO: Implement this
|
||||
println!("Not implemented!");
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@ -5,7 +5,10 @@ use structopt::StructOpt;
|
||||
async fn main() -> DrainerResult<()> {
|
||||
// Get configuration
|
||||
let cmd_line = settings::CmdLineConf::from_args();
|
||||
let conf = settings::Settings::with_config_path(cmd_line.config_path).unwrap();
|
||||
|
||||
#[allow(clippy::expect_used)]
|
||||
let conf = settings::Settings::with_config_path(cmd_line.config_path)
|
||||
.expect("Unable to construct application configuration");
|
||||
|
||||
let store = services::Store::new(&conf, false).await;
|
||||
let store = std::sync::Arc::new(store);
|
||||
|
||||
Reference in New Issue
Block a user