add common crate

Signed-off-by: xermicus <cyrill@parity.io>
This commit is contained in:
xermicus
2024-03-22 16:19:18 +01:00
parent 50f2dd9b74
commit c52a8d0f20
65 changed files with 839 additions and 271 deletions
+4 -6
View File
@@ -103,7 +103,7 @@ impl Assembly {
hash_data_mapping: &BTreeMap<String, String>,
) -> anyhow::Result<BTreeMap<String, String>> {
let mut index_path_mapping = BTreeMap::new();
let index = "0".repeat(era_compiler_common::BYTE_LENGTH_FIELD * 2);
let index = "0".repeat(revive_common::BYTE_LENGTH_FIELD * 2);
index_path_mapping.insert(index, full_path.to_owned());
let dependencies = match self.data.as_mut() {
@@ -115,8 +115,7 @@ impl Assembly {
continue;
}
let mut index_extended =
"0".repeat(era_compiler_common::BYTE_LENGTH_FIELD * 2 - index.len());
let mut index_extended = "0".repeat(revive_common::BYTE_LENGTH_FIELD * 2 - index.len());
index_extended.push_str(index.as_str());
*data = match data {
@@ -154,7 +153,7 @@ impl Assembly {
hash_data_mapping: &BTreeMap<String, String>,
) -> anyhow::Result<BTreeMap<String, String>> {
let mut index_path_mapping = BTreeMap::new();
let index = "0".repeat(era_compiler_common::BYTE_LENGTH_FIELD * 2);
let index = "0".repeat(revive_common::BYTE_LENGTH_FIELD * 2);
index_path_mapping.insert(index, full_path.to_owned());
let dependencies = match self
@@ -168,8 +167,7 @@ impl Assembly {
None => return Ok(index_path_mapping),
};
for (index, data) in dependencies.iter_mut() {
let mut index_extended =
"0".repeat(era_compiler_common::BYTE_LENGTH_FIELD * 2 - index.len());
let mut index_extended = "0".repeat(revive_common::BYTE_LENGTH_FIELD * 2 - index.len());
index_extended.push_str(index.as_str());
*data = match data {