Skip to content

Commit e6977b2

Browse files
author
Barnabas Ratki
committed
fix test clippy
1 parent 7885a4e commit e6977b2

3 files changed

Lines changed: 4 additions & 5 deletions

File tree

programs/program-authority-escrow/src/tests/simulator.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ impl EscrowSimulator {
214214
.await
215215
.unwrap()
216216
.unwrap();
217-
return ProgramData::try_deserialize(&mut account.data.as_slice()).unwrap();
217+
ProgramData::try_deserialize(&mut account.data.as_slice()).unwrap()
218218
}
219219

220220
pub fn get_escrow_authority(

programs/program-authority-timelock/src/tests/simulator.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ impl TimelockSimulator {
198198
.await
199199
.unwrap()
200200
.unwrap();
201-
return ProgramData::try_deserialize(&mut account.data.as_slice()).unwrap();
201+
ProgramData::try_deserialize(&mut account.data.as_slice()).unwrap()
202202
}
203203

204204
pub fn get_escrow_authority(&self, new_authority: &Pubkey, timestamp: i64) -> Pubkey {

programs/program-authority-timelock/src/tests/test.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,9 @@ impl From<ErrorCode> for TransactionError {
1717
fn from(val: ErrorCode) -> Self {
1818
TransactionError::InstructionError(
1919
0,
20-
InstructionError::try_from(u64::from(ProgramError::from(
20+
InstructionError::from(u64::from(ProgramError::from(
2121
anchor_lang::prelude::Error::from(val),
22-
)))
23-
.unwrap(),
22+
))),
2423
)
2524
}
2625
}

0 commit comments

Comments
 (0)