We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 009d8c0 commit cc3565cCopy full SHA for cc3565c
solana/programs/ntt-quoter/src/processor/admin.rs
@@ -79,12 +79,14 @@ pub struct SetAssistant<'info> {
79
pub assistant: Option<UncheckedAccount<'info>>,
80
}
81
82
+// Allow the redundant closure in arguments to map_or_else
83
+#[allow(clippy::redundant_closure)]
84
pub fn set_assistant(ctx: Context<SetAssistant>) -> Result<()> {
85
ctx.accounts.instance.assistant = ctx
86
.accounts
87
.assistant
88
.as_deref()
- .map_or_else(|| { Pubkey::default() }, |val| val.key());
89
+ .map_or_else(|| Pubkey::default(), |val| val.key());
90
Ok(())
91
92
0 commit comments