Skip to content

Commit

Permalink
Remove useless intermediary result variable.
Browse files Browse the repository at this point in the history
  • Loading branch information
florianduros committed Nov 7, 2024
1 parent e55aee9 commit c47066f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/rust-crypto/rust-crypto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1337,8 +1337,7 @@ export class RustCrypto extends TypedEventEmitter<RustCryptoEvents, CryptoEventH
stage: "fetch",
});

const result = await this.backupManager.restoreKeyBackup(backupInfo.version, backupDecryptor, opts);
return result;
return await this.backupManager.restoreKeyBackup(backupInfo.version, backupDecryptor, opts);
} finally {
// Free to avoid to keep in memory the decryption key stored in it. To avoid to exposing it to an attacker.
backupDecryptor.free();
Expand Down

0 comments on commit c47066f

Please sign in to comment.