Skip to content

Commit bfa7a5a

Browse files
committed
chore: cargo fmt
1 parent 01501d9 commit bfa7a5a

File tree

5 files changed

+18
-27
lines changed

5 files changed

+18
-27
lines changed

src/frontend/cli.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,9 @@ fn execute_changes(changes: Vec<Changes>) {
472472
let file = File::open(path.clone()).unwrap();
473473
let mut project_manifest_file_reader = BufReader::new(file);
474474
let mut project_manifest_file = vec![];
475-
project_manifest_file_reader.read_to_end(&mut project_manifest_file).unwrap();
475+
project_manifest_file_reader
476+
.read_to_end(&mut project_manifest_file)
477+
.unwrap();
476478
let project_manifest_file: ProjectManifestFile =
477479
toml::from_slice(&project_manifest_file[..]).unwrap();
478480
ProjectManifest::from_project_manifest_file(project_manifest_file)

src/types/chain_config.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,8 @@ impl ChainConfig {
178178
chain_config_file_reader
179179
.read_to_end(&mut chain_config_file_buffer)
180180
.unwrap();
181-
let mut chain_config_file: ChainConfigFile = toml::from_slice(&chain_config_file_buffer[..]).unwrap();
181+
let mut chain_config_file: ChainConfigFile =
182+
toml::from_slice(&chain_config_file_buffer[..]).unwrap();
182183
ChainConfig::from_chain_config_file(&mut chain_config_file)
183184
}
184185

src/types/data.rs

Lines changed: 3 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ pub struct Timestamp(i64);
4141
pub struct Transaction {
4242
pub transaction_identifier: TransactionIdentifier,
4343
pub operations: Vec<Operation>,
44-
/// Transactions that are related to other transactions should include the
44+
/// Transactions that are related to other transactions should include the
4545
/// transaction_identifier of these transactions in the metadata.
4646
pub metadata: TransactionMetadata,
4747
}
@@ -72,15 +72,7 @@ pub struct TransactionIdentifier {
7272
}
7373

7474
#[derive(
75-
Debug,
76-
Clone,
77-
Copy,
78-
PartialEq,
79-
Eq,
80-
Serialize,
81-
Deserialize,
82-
strum::EnumIter,
83-
strum::IntoStaticStr,
75+
Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize, strum::EnumIter, strum::IntoStaticStr,
8476
)]
8577
#[serde(rename_all = "SCREAMING_SNAKE_CASE")]
8678
pub enum OperationType {
@@ -198,15 +190,7 @@ pub struct OperationIdentifier {
198190
pub network_index: Option<i64>,
199191
}
200192

201-
#[derive(
202-
Debug,
203-
Clone,
204-
Copy,
205-
PartialEq,
206-
serde::Serialize,
207-
serde::Deserialize,
208-
strum::EnumIter,
209-
)]
193+
#[derive(Debug, Clone, Copy, PartialEq, serde::Serialize, serde::Deserialize, strum::EnumIter)]
210194
#[serde(rename_all = "SCREAMING_SNAKE_CASE")]
211195
pub enum OperationStatusKind {
212196
Success,
@@ -250,7 +234,6 @@ pub struct SubAccountIdentifier {
250234
* pub metadata: Option<serde_json::Value>, */
251235
}
252236

253-
254237
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
255238
#[serde(rename_all = "SCREAMING_SNAKE_CASE")]
256239
pub enum SubAccount {

src/types/mod.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
mod chain_config;
2-
mod project_manifest;
32
mod data;
3+
mod project_manifest;
44

55
pub use chain_config::{
66
compute_addresses, AccountConfig, ChainConfig, ChainConfigFile, DevnetConfig, DevnetConfigFile,
77
PoxStackingOrder, DEFAULT_DERIVATION_PATH,
88
};
9-
pub use project_manifest::{ContractConfig, ProjectManifest, ProjectManifestFile, RequirementConfig};
9+
pub use project_manifest::{
10+
ContractConfig, ProjectManifest, ProjectManifestFile, RequirementConfig,
11+
};
1012

11-
pub use data::{BlockIdentifier, Block};
13+
pub use data::{Block, BlockIdentifier};

src/types/project_manifest.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,8 @@ impl ProjectManifest {
6464
project_manifest_file_reader
6565
.read_to_end(&mut project_manifest_file_buffer)
6666
.unwrap();
67-
let project_manifest_file: ProjectManifestFile = toml::from_slice(&project_manifest_file_buffer[..]).unwrap();
67+
let project_manifest_file: ProjectManifestFile =
68+
toml::from_slice(&project_manifest_file_buffer[..]).unwrap();
6869
ProjectManifest::from_project_manifest_file(project_manifest_file)
6970
}
7071

@@ -124,7 +125,9 @@ impl ProjectManifest {
124125
dst
125126
}
126127

127-
pub fn from_project_manifest_file(project_manifest_file: ProjectManifestFile) -> ProjectManifest {
128+
pub fn from_project_manifest_file(
129+
project_manifest_file: ProjectManifestFile,
130+
) -> ProjectManifest {
128131
let project = ProjectConfig {
129132
name: project_manifest_file.project.name.clone(),
130133
requirements: None,

0 commit comments

Comments
 (0)