Skip to content

Commit 018cb2a

Browse files
committed
Ran cargo fmt and removed rust-versions where needed
1 parent c70fba4 commit 018cb2a

File tree

20 files changed

+127
-101
lines changed

20 files changed

+127
-101
lines changed

contracts/registry/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ description = "A crate for managing and deploying smart contracts on the Soroban
44
version = "0.1.1"
55
authors = ["Aha Labs <hello@theaha.co>"]
66
license = "Apache-2.0"
7-
rust-version = "1.69"
87
edition = "2024"
98
publish = false
109

contracts/registry/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#![no_std]
2-
use loam_subcontract_core::{admin::Admin, Core};
2+
use loam_subcontract_core::{Core, admin::Admin};
33

4-
use registry::{contract::C as Contract_, wasm::W as Wasm, Deployable, Publishable, Redeployable};
4+
use registry::{Deployable, Publishable, Redeployable, contract::C as Contract_, wasm::W as Wasm};
55

66
pub mod error;
77
pub mod name;

contracts/registry/src/registry/contract.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,21 @@
22
use loam_sdk::{
33
loamstorage,
44
soroban_sdk::{
5-
self, assert_with_error, contracttype, env, symbol_short, to_string, Address, BytesN, Env,
6-
IntoVal, InvokeError, PersistentMap, String, Symbol,
5+
self, Address, BytesN, Env, IntoVal, InvokeError, PersistentMap, String, Symbol,
6+
assert_with_error, contracttype, env, symbol_short, to_string,
77
},
88
vec,
99
};
1010
use loam_subcontract_core::Core;
1111

1212
use crate::{
13+
Contract as Contract_,
1314
error::Error,
1415
name::canonicalize,
15-
util::{hash_string, MAX_BUMP, REGISTRY},
16-
Contract as Contract_,
16+
util::{MAX_BUMP, REGISTRY, hash_string},
1717
};
1818

19-
use super::{wasm::W, IsDeployable, IsRedeployable};
19+
use super::{IsDeployable, IsRedeployable, wasm::W};
2020

2121
#[contracttype]
2222
pub struct DeployEventData {

contracts/registry/src/registry/wasm.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use loam_sdk::{
22
loamstorage,
33
soroban_sdk::{
4-
self, contracttype, env, to_string, Address, BytesN, Env, Map, PersistentMap, String,
4+
self, Address, BytesN, Env, Map, PersistentMap, String, contracttype, env, to_string,
55
},
66
};
77
use loam_subcontract_core::Core as _;

contracts/registry/src/test.rs

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
use crate::{
2-
error::Error, name::canonicalize, SorobanContract__,
3-
SorobanContract__Client as SorobanContractClient,
2+
SorobanContract__, SorobanContract__Client as SorobanContractClient, error::Error,
3+
name::canonicalize,
44
};
55
use assert_matches::assert_matches;
66
use loam_sdk::soroban_sdk::{
7-
self, env, set_env,
7+
self, Address, Bytes, BytesN, Env, IntoVal, env, set_env,
88
testutils::{Address as _, BytesN as _},
9-
to_string, Address, Bytes, BytesN, Env, IntoVal,
9+
to_string,
1010
};
1111
extern crate std;
1212

@@ -93,14 +93,16 @@ fn returns_most_recent_version() {
9393
let res = client.fetch_hash(name, &None);
9494
assert_eq!(res, second_hash);
9595

96-
assert!(client
97-
.try_publish_hash(
98-
name,
99-
address,
100-
&second_hash.into_val(env),
101-
&to_string("0.0.2"),
102-
)
103-
.is_err());
96+
assert!(
97+
client
98+
.try_publish_hash(
99+
name,
100+
address,
101+
&second_hash.into_val(env),
102+
&to_string("0.0.2"),
103+
)
104+
.is_err()
105+
);
104106

105107
let second_hash: BytesN<32> = BytesN::random(env);
106108
client.publish_hash(

contracts/registry/src/util.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use loam_sdk::soroban_sdk::{crypto::Hash, env, Bytes, String};
1+
use loam_sdk::soroban_sdk::{Bytes, String, crypto::Hash, env};
22

33
pub fn hash_string(s: &String) -> Hash<32> {
44
let env = env();

crates/stellar-registry-cli/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ license = "Apache-2.0"
77
readme = "README.md"
88
version = "0.0.12"
99
edition = "2024"
10-
rust-version = "1.70"
10+
rust-version = "1.89"
1111
autobins = false
1212
repository = "https://github.com/theahaco/scaffold-stellar/tree/main/crates/stellar-registry-cli"
1313

crates/stellar-registry-cli/src/commands/create_alias.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,11 @@ mod tests {
105105

106106
// Run the install command
107107
cmd.run().await.unwrap();
108-
assert!(test_env
109-
.cwd
110-
.join(".config/stellar/contract-ids/hello.json")
111-
.exists());
108+
assert!(
109+
test_env
110+
.cwd
111+
.join(".config/stellar/contract-ids/hello.json")
112+
.exists()
113+
);
112114
}
113115
}

crates/stellar-registry-cli/src/commands/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use std::str::FromStr;
22

3-
use clap::{command, CommandFactory, FromArgMatches, Parser};
3+
use clap::{CommandFactory, FromArgMatches, Parser, command};
44

55
pub mod create_alias;
66
pub mod deploy;

crates/stellar-registry-cli/src/contract.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ use sha2::{Digest, Sha256};
22

33
use soroban_rpc as rpc;
44
use stellar_cli::{
5-
commands::{contract::invoke, NetworkRunnable},
6-
config::{self, network::Network, UnresolvedContract},
5+
commands::{NetworkRunnable, contract::invoke},
6+
config::{self, UnresolvedContract, network::Network},
77
xdr::{self, WriteXdr},
88
};
99

0 commit comments

Comments
 (0)