cargo fmt + clippy
This commit is contained in:
@@ -11,7 +11,8 @@ use crate::core::{
|
||||
database_operations::{
|
||||
apply_permission_diffs, db_priv_field_human_readable_name, diff_permissions, yn,
|
||||
DatabasePrivileges, DATABASE_PRIVILEGE_FIELDS,
|
||||
}, user_operations::user_exists,
|
||||
},
|
||||
user_operations::user_exists,
|
||||
};
|
||||
|
||||
// TODO: Support batch creation/dropping,showing of databases,
|
||||
@@ -520,10 +521,10 @@ pub async fn edit_permissions(
|
||||
};
|
||||
|
||||
for row in permissions_to_change.iter() {
|
||||
if !user_exists(&row.user, conn).await? {
|
||||
// TODO: allow user to return and correct their mistake
|
||||
anyhow::bail!("User {} does not exist", row.user);
|
||||
}
|
||||
if !user_exists(&row.user, conn).await? {
|
||||
// TODO: allow user to return and correct their mistake
|
||||
anyhow::bail!("User {} does not exist", row.user);
|
||||
}
|
||||
}
|
||||
|
||||
let diffs = diff_permissions(permission_data, &permissions_to_change).await;
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
pub mod common;
|
||||
pub mod mysql_dbadm;
|
||||
pub mod mysql_useradm;
|
||||
pub mod mysql_useradm;
|
||||
|
||||
@@ -54,12 +54,7 @@ pub struct Args {
|
||||
/// This is a compatibility layer for the mysql-dbadm command.
|
||||
/// Please consider using the newer mysqladm command instead.
|
||||
#[derive(Parser)]
|
||||
#[command(
|
||||
version,
|
||||
about,
|
||||
disable_help_subcommand = true,
|
||||
verbatim_doc_comment,
|
||||
)]
|
||||
#[command(version, about, disable_help_subcommand = true, verbatim_doc_comment)]
|
||||
pub enum Command {
|
||||
/// create the DATABASE(s).
|
||||
Create(CreateArgs),
|
||||
@@ -73,7 +68,6 @@ pub enum Command {
|
||||
|
||||
// TODO: make this output more verbatim_doc_comment-like,
|
||||
// without messing up the indentation.
|
||||
|
||||
/// change permissions for the DATABASE(s). Your
|
||||
/// favorite editor will be started, allowing you
|
||||
/// to make changes to the permission table.
|
||||
|
||||
Reference in New Issue
Block a user