chore: edition 2024

This commit is contained in:
Lucas Nogueira committed 2026-09-26 15:36:22 -03:00
1 parent b517cc7e85
commit 3d8a3c877b
100 files changed
+276 -253

No files matched your search

+2 -2
View File
@@ -45,8 +45,8 @@ fn create_or_get_salt(salt: &mut [u8], salt_path: &Path) {
salt.clone_from_slice(&tmp);
} else {
// Generate new salt
let mut gen = ChaCha20Rng::from_os_rng();
gen.fill_bytes(salt);
let mut rng = ChaCha20Rng::from_os_rng();
rng.fill_bytes(salt);
std::fs::write(salt_path, salt).expect("Failed to write salt for Stronghold")
}
}
+5 -6
View File
@@ -23,18 +23,18 @@ use std::{
use crypto::keys::bip39;
use iota_stronghold::{
Client, Location,
procedures::{
BIP39Generate, BIP39Recover, Curve, Ed25519Sign, KeyType as StrongholdKeyType,
MnemonicLanguage, PublicKey, Slip10Derive, Slip10DeriveInput, Slip10Generate,
StrongholdProcedure,
},
Client, Location,
};
use serde::{de::Visitor, Deserialize, Deserializer};
use serde::{Deserialize, Deserializer, de::Visitor};
use stronghold::{Error, Result, Stronghold};
use tauri::{
plugin::{Builder as PluginBuilder, TauriPlugin},
Manager, Runtime, State,
plugin::{Builder as PluginBuilder, TauriPlugin},
};
use zeroize::{Zeroize, Zeroizing};
@@ -270,12 +270,11 @@ async fn destroy(
snapshot_path: PathBuf,
) -> Result<()> {
let mut collection = collection.0.lock().unwrap();
if let Some(stronghold) = collection.remove(&snapshot_path) {
if let Err(e) = stronghold.save() {
if let Some(stronghold) = collection.remove(&snapshot_path)
&& let Err(e) = stronghold.save() {
collection.insert(snapshot_path, stronghold);
return Err(e);
}
}
Ok(())
}