Skip to content

Commit

Permalink
fixup: cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
amnn committed Jul 11, 2024
1 parent 4175669 commit 02f828d
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 19 deletions.
3 changes: 1 addition & 2 deletions crates/sui-e2e-tests/tests/full_node_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1011,8 +1011,7 @@ async fn test_get_objects_read() -> Result<(), anyhow::Error> {
.expect("Failed to transfer coins to recipient");

// Delete the object
let response =
delete_nft(&test_cluster.wallet, recipient, package_id, object_ref_v2).await;
let response = delete_nft(&test_cluster.wallet, recipient, package_id, object_ref_v2).await;
assert_eq!(
*response.effects.unwrap().status(),
SuiExecutionStatus::Success
Expand Down
9 changes: 3 additions & 6 deletions crates/sui-framework-tests/src/metered_verifier.rs
Original file line number Diff line number Diff line change
Expand Up @@ -191,14 +191,12 @@ fn test_metered_move_bytecode_verifier() {
// Check shared meter logic works across all publish in PT
let mut packages = vec![];
let with_unpublished_deps = false;
let path =
PathBuf::from(env!("CARGO_MANIFEST_DIR")).join("../../examples/move/basics");
let path = PathBuf::from(env!("CARGO_MANIFEST_DIR")).join("../../examples/move/basics");
let package = build(&path).unwrap();
packages.push(package.get_dependency_sorted_modules(with_unpublished_deps));
packages.push(package.get_dependency_sorted_modules(with_unpublished_deps));

let path = PathBuf::from(env!("CARGO_MANIFEST_DIR"))
.join("../../examples/move/coin");
let path = PathBuf::from(env!("CARGO_MANIFEST_DIR")).join("../../examples/move/coin");
let package = build(&path).unwrap();
packages.push(package.get_dependency_sorted_modules(with_unpublished_deps));

Expand Down Expand Up @@ -288,8 +286,7 @@ fn test_build_and_verify_programmability_examples() {
let meter_config = protocol_config.meter_config();
let registry = &Registry::new();
let bytecode_verifier_metrics = Arc::new(BytecodeVerifierMetrics::new(registry));
let examples =
PathBuf::from(env!("CARGO_MANIFEST_DIR")).join("../../examples");
let examples = PathBuf::from(env!("CARGO_MANIFEST_DIR")).join("../../examples");

for example in std::fs::read_dir(examples).unwrap() {
let Ok(example) = example else { continue };
Expand Down
5 changes: 2 additions & 3 deletions crates/sui-json-rpc-tests/tests/rpc_server_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -188,9 +188,8 @@ async fn test_publish() -> Result<(), anyhow::Error> {
.await?;
let gas = objects.data.first().unwrap().object().unwrap();

let compiled_package = BuildConfig::new_for_testing().build(Path::new(
"../../examples/move/basics",
))?;
let compiled_package =
BuildConfig::new_for_testing().build(Path::new("../../examples/move/basics"))?;
let compiled_modules_bytes =
compiled_package.get_package_base64(/* with_unpublished_deps */ false);
let dependencies = compiled_package.get_dependency_original_package_ids();
Expand Down
10 changes: 2 additions & 8 deletions crates/sui-rosetta/src/unit_tests/balance_changing_tx_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ use rand::seq::{IteratorRandom, SliceRandom};
use serde_json::json;
use shared_crypto::intent::Intent;
use signature::rand_core::OsRng;
use sui_types::TypeTag;
use std::collections::{BTreeMap, HashMap};
use std::path::PathBuf;
use std::str::FromStr;
Expand All @@ -36,6 +35,7 @@ use sui_types::transaction::{
TEST_ONLY_GAS_UNIT_FOR_HEAVY_COMPUTATION_STORAGE, TEST_ONLY_GAS_UNIT_FOR_SPLIT_COIN,
TEST_ONLY_GAS_UNIT_FOR_STAKING, TEST_ONLY_GAS_UNIT_FOR_TRANSFER,
};
use sui_types::TypeTag;
use test_cluster::TestClusterBuilder;

#[tokio::test]
Expand Down Expand Up @@ -140,13 +140,7 @@ async fn test_publish_and_move_call() {
let addresses = network.get_addresses();
let sender = get_random_address(&addresses, vec![]);
let mut path = PathBuf::from(env!("CARGO_MANIFEST_DIR"));
path.extend([
"..",
"..",
"examples",
"move",
"coin",
]);
path.extend(["..", "..", "examples", "move", "coin"]);
let compiled_package = BuildConfig::new_for_testing().build(&path).unwrap();
let compiled_modules_bytes =
compiled_package.get_package_bytes(/* with_unpublished_deps */ false);
Expand Down

0 comments on commit 02f828d

Please sign in to comment.