Skip to content

Commit cc3565c

Browse files
committed
lint: Allow redundant closure for or_fun_call
1 parent 009d8c0 commit cc3565c

File tree

1 file changed

+3
-1
lines changed
  • solana/programs/ntt-quoter/src/processor

1 file changed

+3
-1
lines changed

solana/programs/ntt-quoter/src/processor/admin.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -79,12 +79,14 @@ pub struct SetAssistant<'info> {
7979
pub assistant: Option<UncheckedAccount<'info>>,
8080
}
8181

82+
// Allow the redundant closure in arguments to map_or_else
83+
#[allow(clippy::redundant_closure)]
8284
pub fn set_assistant(ctx: Context<SetAssistant>) -> Result<()> {
8385
ctx.accounts.instance.assistant = ctx
8486
.accounts
8587
.assistant
8688
.as_deref()
87-
.map_or_else(|| { Pubkey::default() }, |val| val.key());
89+
.map_or_else(|| Pubkey::default(), |val| val.key());
8890
Ok(())
8991
}
9092

0 commit comments

Comments
 (0)