Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
0xOmarA committed Dec 13, 2024
1 parent c1d95a7 commit 88d4a3a
Show file tree
Hide file tree
Showing 13 changed files with 34 additions and 54 deletions.
11 changes: 4 additions & 7 deletions crates/radix-engine-toolkit-uniffi/src/blueprints/metadata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,10 @@ impl ToNative for MetadataInit {
None => None,
};

Ok((
key,
NativeKeyValueStoreInitEntry::<NativeMetadataValue> {
lock: value.lock,
value: metadata,
},
))
Ok((key, NativeKeyValueStoreInitEntry::<NativeMetadataValue> {
lock: value.lock,
value: metadata,
}))
})
.collect::<Result<
IndexMap<
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#![allow(clippy::too_many_arguments)]

use crate::prelude::*;
use radix_common::prelude::{to_manifest_value, FromPublicKey};
use radix_common::prelude::{FromPublicKey, to_manifest_value};

#[derive(Debug, Clone, Object, Default)]
pub struct ManifestV1Builder {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#![allow(clippy::too_many_arguments)]

use crate::prelude::*;
use radix_common::prelude::{to_manifest_value, FromPublicKey};
use radix_common::prelude::{FromPublicKey, to_manifest_value};

#[derive(Debug, Clone, Object)]
pub struct ManifestV2Builder {
Expand Down
2 changes: 1 addition & 1 deletion crates/radix-engine-toolkit/src/functions/manifest_sbor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
// under the License.

use radix_transactions::data::{
format_manifest_value, ManifestDecompilationDisplayContext,
ManifestDecompilationDisplayContext, format_manifest_value,
};
use sbor::prelude::ContextualSerialize;
use sbor::representations::{SerializationMode, SerializationParameters};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
use radix_common::prelude::*;
use radix_engine_toolkit_common::receipt::RuntimeToolkitTransactionReceipt;
use radix_transactions::errors::*;
use radix_transactions::manifest::static_resource_movements::StaticResourceMovementsError;
use radix_transactions::manifest::BuildableManifest;
use radix_transactions::manifest::static_resource_movements::StaticResourceMovementsError;
use radix_transactions::prelude::*;
use radix_transactions::validation::*;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -295,14 +295,11 @@ mod tests {
let input = "account_sim1cyvgx33089ukm2pl97pv4max0x40ruvfy4lt60yvya744cve475w0q";

let x = CanonicalAccountAddress::from_str(input).unwrap();
assert_eq!(
x.node_id.as_bytes(),
[
193, 24, 131, 70, 47, 57, 121, 109, 168, 63, 47, 130, 202, 239,
166, 121, 170, 241, 241, 137, 37, 126, 189, 60, 140, 39, 125,
90, 225, 153
]
);
assert_eq!(x.node_id.as_bytes(), [
193, 24, 131, 70, 47, 57, 121, 109, 168, 63, 47, 130, 202, 239,
166, 121, 170, 241, 241, 137, 37, 126, 189, 60, 140, 39, 125, 90,
225, 153
]);
assert_eq!(x.network_id, 0xf2);
assert_eq!(x.to_string(), input);

Expand Down
2 changes: 1 addition & 1 deletion crates/radix-engine-toolkit/tests/manifest_sbor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
// under the License.

use radix_common::prelude::{
manifest_encode, AddressBech32Encoder, ManifestValue, ScryptoCustomSchema,
AddressBech32Encoder, ManifestValue, ScryptoCustomSchema, manifest_encode,
};
use radix_common::{ManifestSbor, ScryptoSbor};
use radix_engine_toolkit::functions::manifest_sbor::ManifestSborStringRepresentation;
Expand Down
18 changes: 6 additions & 12 deletions crates/radix-engine-toolkit/tests/non_fungible.rs
Original file line number Diff line number Diff line change
Expand Up @@ -234,18 +234,12 @@ fn dynamic_analysis_new_non_fungible_list_after_update() {
NonFungibleResourceRoles::single_locked_rule(AccessRule::AllowAll),
ModuleConfig::default(),
Some(vec![
(
nf_id_1.clone(),
NfData {
name: "data_1".to_string(),
},
),
(
nf_id_2.clone(),
NfData {
name: "data_2".to_string(),
},
),
(nf_id_1.clone(), NfData {
name: "data_1".to_string(),
}),
(nf_id_2.clone(), NfData {
name: "data_2".to_string(),
}),
]),
)
.try_deposit_entire_worktop_or_abort(account, None)
Expand Down
2 changes: 1 addition & 1 deletion crates/radix-engine-toolkit/tests/schema_visitor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
// specific language governing permissions and limitations
// under the License.

use radix_common::prelude::ScryptoCustomSchema;
use radix_common::ScryptoSbor;
use radix_common::prelude::ScryptoCustomSchema;
use radix_engine_toolkit::schema_visitor::core::traverser::traverse;
use radix_engine_toolkit::schema_visitor::visitors::bucket_in_path_visitor::BucketInPathVisitor;
use radix_engine_toolkit::schema_visitor::visitors::proof_in_path_visitor::ProofInPathVisitor;
Expand Down
4 changes: 2 additions & 2 deletions crates/radix-engine-toolkit/tests/scrypto_sbor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
// specific language governing permissions and limitations
// under the License.

use radix_common::ScryptoSbor;
use radix_common::prelude::{
scrypto_encode, AddressBech32Encoder, ScryptoCustomSchema, ScryptoValue,
AddressBech32Encoder, ScryptoCustomSchema, ScryptoValue, scrypto_encode,
};
use radix_common::ScryptoSbor;
use sbor::generate_full_schema_from_single_type;
use sbor::representations::SerializationMode;

Expand Down
17 changes: 6 additions & 11 deletions crates/radix-engine-toolkit/tests/test_runner_extension.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,12 @@ where
&mut self,
manifest: TransactionManifestV1,
) -> TransactionReceiptV1 {
self.preview_manifest(
manifest,
vec![],
0,
PreviewFlags {
use_free_credit: true,
assume_all_signature_proofs: true,
skip_epoch_check: true,
disable_auth: true,
},
)
self.preview_manifest(manifest, vec![], 0, PreviewFlags {
use_free_credit: true,
assume_all_signature_proofs: true,
skip_epoch_check: true,
disable_auth: true,
})
}

fn summarize(
Expand Down
2 changes: 1 addition & 1 deletion crates/sbor-json/src/scrypto/programmatic/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
// under the License.

use super::value::ProgrammaticScryptoValue;
use super::visitor::{traverse, AddressNetworkMismatchVisitor};
use super::visitor::{AddressNetworkMismatchVisitor, traverse};

pub fn value_contains_network_mismatch(
value: &ProgrammaticScryptoValue,
Expand Down
11 changes: 4 additions & 7 deletions crates/sbor-json/tests/programmatic_scrypto_sbor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,13 +107,10 @@ pub fn payload_serialized_with_schema_can_be_deserialized_as_no_schema_programma
.unwrap();

// Assert
assert_eq!(
deserialized,
ProgrammaticScryptoValue::Enum {
discriminator: 2,
fields: vec![ProgrammaticScryptoValue::U8 { value: 1 }]
}
)
assert_eq!(deserialized, ProgrammaticScryptoValue::Enum {
discriminator: 2,
fields: vec![ProgrammaticScryptoValue::U8 { value: 1 }]
})
}

#[test]
Expand Down

0 comments on commit 88d4a3a

Please sign in to comment.