Remove unnecessary state_tests module
This module adds an extra level of depth that is no longer needed.
// See the License for the specific language governing permissions and
// limitations under the License.
-mod state_tests {
use std::collections::HashMap;
use std::str::from_utf8;
@@ -314,9 +313,7 @@ mod state_tests {
for delete_change in delete_items {
match delete_change {
- StateChange::Delete { key } => {
- assert!(merkle_db.get_value(&key).unwrap().is_none())
- }
+ StateChange::Delete { key } => assert!(merkle_db.get_value(&key).unwrap().is_none()),
_ => (),
}
}
@@ -588,8 +585,7 @@ mod state_tests {
)
.expect("Set failed to work");
- let successor_root_left_bytes =
- ::hex::decode(successor_root_left.clone()).expect("proper hex");
+ let successor_root_left_bytes = ::hex::decode(successor_root_left.clone()).expect("proper hex");
let successor_root_right = merkle_state
.commit(
@@ -869,8 +865,8 @@ mod state_tests {
let mut prune_result_left =
MerkleRadixTree::prune(&*left, &merkle_left_root).expect("Prune should have no errors");
- let mut prune_result_right = MerkleRadixTree::prune(&*right, &merkle_right_root)
- .expect("Prune should have no errors");
+ let mut prune_result_right =
+ MerkleRadixTree::prune(&*right, &merkle_right_root).expect("Prune should have no errors");
assert_eq!(
prune_result_left.sort_unstable(),
@@ -1337,4 +1333,3 @@ mod state_tests {
Ok(())
}
}
-}
