Skip to content

Commit

Permalink
clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
abdulmth committed Aug 7, 2023
1 parent c00764d commit 403abc0
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 9 deletions.
4 changes: 2 additions & 2 deletions examples/0_basic/0_create_did.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,14 @@ async fn main() -> anyhow::Result<()> {
.await?;

// Create a new secret manager backed by a Stronghold.
let mut secret_manager: SecretManager = SecretManager::Stronghold(
let secret_manager: SecretManager = SecretManager::Stronghold(
StrongholdSecretManager::builder()
.password(Password::from("secure_password".to_owned()))
.build(random_stronghold_path())?,
);

// Get an address with funds for testing.
let address: Address = get_address_with_funds(&client, &mut secret_manager, faucet_endpoint).await?;
let address: Address = get_address_with_funds(&client, &secret_manager, faucet_endpoint).await?;

// Get the Bech32 human-readable part (HRP) of the network.
let network_name: NetworkName = client.network_name().await?;
Expand Down
4 changes: 1 addition & 3 deletions examples/0_basic/8_stronghold.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
// Copyright 2020-2023 IOTA Stiftung
// SPDX-License-Identifier: Apache-2.0

use std::ops::Deref;
use std::ops::DerefMut;

use examples::get_address_with_funds;
use examples::random_stronghold_path;
use identity_iota::credential::Jws;
Expand All @@ -27,6 +24,7 @@ use iota_sdk::client::Client;
use iota_sdk::client::Password;
use iota_sdk::types::block::address::Address;
use iota_sdk::types::block::output::AliasOutput;
use std::ops::Deref;

/// Demonstrates how to use stronghold for secure storage.
#[tokio::main]
Expand Down
4 changes: 2 additions & 2 deletions examples/1_advanced/2_nft_owns_did.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,14 @@ async fn main() -> anyhow::Result<()> {
.await?;

// Create a new secret manager backed by a Stronghold.
let mut secret_manager: SecretManager = SecretManager::Stronghold(
let secret_manager: SecretManager = SecretManager::Stronghold(
StrongholdSecretManager::builder()
.password(Password::from("secure_password".to_owned()))
.build(random_stronghold_path())?,
);

// Get an address with funds for testing.
let address: Address = get_address_with_funds(&client, &mut secret_manager, FAUCET_ENDPOINT).await?;
let address: Address = get_address_with_funds(&client, &secret_manager, FAUCET_ENDPOINT).await?;

// Get the current byte cost.
let rent_structure: RentStructure = client.get_rent_structure().await?;
Expand Down
3 changes: 1 addition & 2 deletions identity_storage/src/secret_manager_wrapper.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
// Copyright 2020-2023 IOTA Stiftung
// SPDX-License-Identifier: Apache-2.0

use std::sync::Arc;

use iota_sdk::client::secret::stronghold::StrongholdSecretManager;
use iota_sdk::client::secret::SecretManager;
use iota_stronghold::Stronghold;
use std::sync::Arc;
use tokio::sync::MutexGuard;

/// Wrapper around `SecretManager` that implements the storage interfaces.
Expand Down

0 comments on commit 403abc0

Please sign in to comment.