Fix clippy lints error
This commit is contained in:
parent
dfe6967f37
commit
d35c2771a6
3 changed files with 3 additions and 6 deletions
|
@ -56,7 +56,7 @@ impl BotCommand for CreateTagCommand {
|
||||||
database: Arc<DatabaseClient>,
|
database: Arc<DatabaseClient>,
|
||||||
) -> Result<(), CommandExecutionError> {
|
) -> Result<(), CommandExecutionError> {
|
||||||
// Extract tag_name parameter
|
// Extract tag_name parameter
|
||||||
let tag_name = match self.interaction.data.options.get(0) {
|
let tag_name = match self.interaction.data.options.first() {
|
||||||
Some(a) => match &a.resolved {
|
Some(a) => match &a.resolved {
|
||||||
Some(r) => match r {
|
Some(r) => match r {
|
||||||
CommandDataOptionValue::String(r_str) => Ok(r_str),
|
CommandDataOptionValue::String(r_str) => Ok(r_str),
|
||||||
|
|
|
@ -55,7 +55,7 @@ impl BotCommand for DeleteTagCommand {
|
||||||
context: Context,
|
context: Context,
|
||||||
database: Arc<DatabaseClient>,
|
database: Arc<DatabaseClient>,
|
||||||
) -> Result<(), CommandExecutionError> {
|
) -> Result<(), CommandExecutionError> {
|
||||||
let tag_name = match self.interaction.data.options.get(0) {
|
let tag_name = match self.interaction.data.options.first() {
|
||||||
Some(a) => match &a.resolved {
|
Some(a) => match &a.resolved {
|
||||||
Some(r) => match r {
|
Some(r) => match r {
|
||||||
CommandDataOptionValue::String(r_str) => Ok(r_str),
|
CommandDataOptionValue::String(r_str) => Ok(r_str),
|
||||||
|
|
|
@ -64,10 +64,7 @@ impl<'a> EmbedSelector<'a> {
|
||||||
selectable: Vec<String>,
|
selectable: Vec<String>,
|
||||||
initial_selection: Option<HashSet<String>>,
|
initial_selection: Option<HashSet<String>>,
|
||||||
) -> Self {
|
) -> Self {
|
||||||
let selection = match initial_selection {
|
let selection = initial_selection.unwrap_or_default();
|
||||||
Some(r) => r,
|
|
||||||
None => HashSet::new(),
|
|
||||||
};
|
|
||||||
|
|
||||||
let mut selector = EmbedSelector {
|
let mut selector = EmbedSelector {
|
||||||
interaction,
|
interaction,
|
||||||
|
|
Loading…
Reference in a new issue