async fn pre_process_input(
    cli: &Cli,
    tx: &Sender<directory_host::Rpc>,
    db: Option<&AsyncMySqlDatabase>,
) -> Option<()> {
    if let Some(OtherMode::Drop) = &cli.other_mode {
        println!("======= Dropping database ======= ");
        if let Some(mysql_db) = db {
            if let Err(error) = mysql_db.drop_tables().await {
                error!("Error dropping database: {}", error);
            } else {
                info!("Database dropped.");
            }
            return Option::from(());
        }
    }
    None
}
// Helpers //
// If () is returned, it means the command execution is complete and CLI should
// return
Helpers
If () is returned, it means the command execution is complete and CLI should
return
Helpers If () is returned it means the command execution is complete and CLI should return
async fn pre_process_input(
    cli: &Cli,
    tx: &Sender<directory_host::Rpc>,
    db: Option<&AsyncMySqlDatabase>,
) -> Option<()> {
    if let Some(OtherMode::Drop) = &cli.other_mode {
        println!("======= Dropping database ======= ");
        if let Some(mysql_db) = db {
            if let Err(error) = mysql_db.drop_tables().await {
                error!("Error dropping database: {}", error);
            } else {
                info!("Database dropped.");
            }
            return Option::from(());
        }
    }
    None
}
async fn pre_process_input ( cli : & Cli , tx : & Sender < directory_host :: Rpc > , db : Option < & AsyncMySqlDatabase > , ) -> Option < ( ) > { if let Some ( OtherMode :: Drop ) = & cli . other_mode { println ! ( " " ) ; if let Some ( mysql_db ) = db { if let Err ( error ) = mysql_db . drop_tables ( ) . await { error ! ( " " error ) ; } else { info ! ( " " ) ; } return Option :: from ( ( ) ) ; } } None }
Helpers
If () is returned, it means the command execution is complete and CLI should
return
Helpers If () is returned it means the command execution is complete and CLI should return
cli
&Cli
tx
&Sender<directory_host::Rpc>
db
Option<&AsyncMySqlDatabase>
cli
&Cli
tx
&Sender<directory_host::Rpc>
db
Option<&AsyncMySqlDatabase>