Skip to content

Commit f9f7608

Browse files
committed
style: apply cargo fmt formatting
1 parent 17dc338 commit f9f7608

2 files changed

Lines changed: 25 additions & 18 deletions

File tree

  • packages/rs-dpp/src/data_contract
    • associated_token/token_perpetual_distribution/distribution_function
    • methods/validate_update/v0

packages/rs-dpp/src/data_contract/associated_token/token_perpetual_distribution/distribution_function/validation.rs

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1180,9 +1180,7 @@ mod tests {
11801180
};
11811181
let result = dist.validate(START_MOMENT, PlatformVersion::latest());
11821182
assert!(result
1183-
.expect(
1184-
"no error on test_step_decreasing_amount_invalid_trailing_exceeds_start"
1185-
)
1183+
.expect("no error on test_step_decreasing_amount_invalid_trailing_exceeds_start")
11861184
.first_error()
11871185
.is_some());
11881186
}
@@ -1262,9 +1260,7 @@ mod tests {
12621260
};
12631261
let result = dist.validate(START_MOMENT, PlatformVersion::latest());
12641262
assert!(result
1265-
.expect(
1266-
"no error on test_step_decreasing_amount_invalid_numerator_gte_denominator"
1267-
)
1263+
.expect("no error on test_step_decreasing_amount_invalid_numerator_gte_denominator")
12681264
.first_error()
12691265
.is_some());
12701266
}
@@ -1283,9 +1279,7 @@ mod tests {
12831279
};
12841280
let result = dist.validate(START_MOMENT, PlatformVersion::latest());
12851281
assert!(result
1286-
.expect(
1287-
"no error on test_step_decreasing_amount_invalid_min_value_exceeds_start"
1288-
)
1282+
.expect("no error on test_step_decreasing_amount_invalid_min_value_exceeds_start")
12891283
.first_error()
12901284
.is_some());
12911285
}

packages/rs-dpp/src/data_contract/methods/validate_update/v0/mod.rs

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -633,7 +633,9 @@ mod tests {
633633

634634
assert_matches!(
635635
result.errors.as_slice(),
636-
[ConsensusError::BasicError(BasicError::TooManyKeywordsError(_))]
636+
[ConsensusError::BasicError(
637+
BasicError::TooManyKeywordsError(_)
638+
)]
637639
);
638640
}
639641

@@ -658,7 +660,9 @@ mod tests {
658660

659661
assert_matches!(
660662
result.errors.as_slice(),
661-
[ConsensusError::BasicError(BasicError::InvalidKeywordLengthError(_))]
663+
[ConsensusError::BasicError(
664+
BasicError::InvalidKeywordLengthError(_)
665+
)]
662666
);
663667
}
664668

@@ -683,7 +687,9 @@ mod tests {
683687

684688
assert_matches!(
685689
result.errors.as_slice(),
686-
[ConsensusError::BasicError(BasicError::InvalidKeywordLengthError(_))]
690+
[ConsensusError::BasicError(
691+
BasicError::InvalidKeywordLengthError(_)
692+
)]
687693
);
688694
}
689695

@@ -708,7 +714,9 @@ mod tests {
708714

709715
assert_matches!(
710716
result.errors.as_slice(),
711-
[ConsensusError::BasicError(BasicError::InvalidKeywordCharacterError(_))]
717+
[ConsensusError::BasicError(
718+
BasicError::InvalidKeywordCharacterError(_)
719+
)]
712720
);
713721
}
714722

@@ -725,16 +733,17 @@ mod tests {
725733

726734
let mut new_data_contract = old_data_contract.clone();
727735
new_data_contract.set_version(old_data_contract.version() + 1);
728-
new_data_contract
729-
.set_keywords(vec!["keyword".to_string(), "keyword".to_string()]);
736+
new_data_contract.set_keywords(vec!["keyword".to_string(), "keyword".to_string()]);
730737

731738
let result = old_data_contract
732739
.validate_update_v0(&new_data_contract, &BlockInfo::default(), platform_version)
733740
.expect("failed validate update");
734741

735742
assert_matches!(
736743
result.errors.as_slice(),
737-
[ConsensusError::BasicError(BasicError::DuplicateKeywordsError(_))]
744+
[ConsensusError::BasicError(
745+
BasicError::DuplicateKeywordsError(_)
746+
)]
738747
);
739748
}
740749

@@ -759,7 +768,9 @@ mod tests {
759768

760769
assert_matches!(
761770
result.errors.as_slice(),
762-
[ConsensusError::BasicError(BasicError::InvalidDescriptionLengthError(_))]
771+
[ConsensusError::BasicError(
772+
BasicError::InvalidDescriptionLengthError(_)
773+
)]
763774
);
764775
}
765776

@@ -784,7 +795,9 @@ mod tests {
784795

785796
assert_matches!(
786797
result.errors.as_slice(),
787-
[ConsensusError::BasicError(BasicError::InvalidDescriptionLengthError(_))]
798+
[ConsensusError::BasicError(
799+
BasicError::InvalidDescriptionLengthError(_)
800+
)]
788801
);
789802
}
790803

0 commit comments

Comments
 (0)