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>,
|
||||
) -> Result<(), CommandExecutionError> {
|
||||
// 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(r) => match r {
|
||||
CommandDataOptionValue::String(r_str) => Ok(r_str),
|
||||
|
|
|
@ -55,7 +55,7 @@ impl BotCommand for DeleteTagCommand {
|
|||
context: Context,
|
||||
database: Arc<DatabaseClient>,
|
||||
) -> 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(r) => match r {
|
||||
CommandDataOptionValue::String(r_str) => Ok(r_str),
|
||||
|
|
|
@ -64,10 +64,7 @@ impl<'a> EmbedSelector<'a> {
|
|||
selectable: Vec<String>,
|
||||
initial_selection: Option<HashSet<String>>,
|
||||
) -> Self {
|
||||
let selection = match initial_selection {
|
||||
Some(r) => r,
|
||||
None => HashSet::new(),
|
||||
};
|
||||
let selection = initial_selection.unwrap_or_default();
|
||||
|
||||
let mut selector = EmbedSelector {
|
||||
interaction,
|
||||
|
|
Loading…
Reference in a new issue