Skip to content

Commit 028d79c

Browse files
committed
fix: lint
1 parent 92cc539 commit 028d79c

File tree

5 files changed

+20
-21
lines changed

5 files changed

+20
-21
lines changed

core/src/helpers/file.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,4 +130,3 @@ pub fn load_env_from_full_path(path: &Path) {
130130
dotenv().ok();
131131
}
132132
}
133-

core/src/helpers/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ use std::{
1515
use dotenv::dotenv;
1616
use ethers::prelude::{I256, U256};
1717
pub use file::{
18-
create_mod_file, format_all_files_for_project, load_env_from_project_path, write_file,
19-
CreateModFileError, WriteFileError, load_env_from_full_path
18+
create_mod_file, format_all_files_for_project, load_env_from_full_path,
19+
load_env_from_project_path, write_file, CreateModFileError, WriteFileError,
2020
};
2121
use rand::{distributions::Alphanumeric, Rng};
2222

core/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ pub use simple_file_formatters::csv::AsyncCsvAppender;
1616

1717
mod helpers;
1818
pub use helpers::{
19-
format_all_files_for_project, generate_random_id, load_env_from_project_path, public_read_env_value,
20-
write_file, WriteFileError,
19+
format_all_files_for_project, generate_random_id, load_env_from_project_path,
20+
public_read_env_value, write_file, WriteFileError,
2121
};
2222
mod api;
2323
pub use api::{generate_graphql_queries, GraphqlOverrideSettings};

core/src/manifest/yaml.rs

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,21 @@ use std::{
55
io::{Read, Write},
66
path::{Path, PathBuf},
77
};
8-
use std::str::FromStr;
8+
99
use ethers::types::ValueOrArray;
1010
use regex::{Captures, Regex};
1111
use serde::{Deserialize, Serialize};
1212
use tracing::error;
1313

14-
use crate::{abi::ABIItem, helpers::replace_env_variable_to_raw_name, load_env_from_project_path, manifest::{
15-
core::{Manifest, ProjectType},
16-
network::Network,
17-
}, StringOrArray};
18-
use crate::helpers::load_env_from_full_path;
14+
use crate::{
15+
abi::ABIItem,
16+
helpers::{load_env_from_full_path, replace_env_variable_to_raw_name},
17+
manifest::{
18+
core::{Manifest, ProjectType},
19+
network::Network,
20+
},
21+
StringOrArray,
22+
};
1923

2024
pub const YAML_CONFIG_NAME: &str = "rindexer.yaml";
2125

@@ -273,17 +277,14 @@ struct ManifestNetworksOnly {
273277

274278
fn extract_environment_path(contents: &str, file_path: &Path) -> Option<PathBuf> {
275279
let re = Regex::new(r"(?m)^environment_path:\s*(.+)$").unwrap();
276-
re.captures(contents)
277-
.and_then(|cap| cap.get(1))
278-
.map(|m| {
279-
let path_str = m.as_str().trim().replace('\"', ""); // Remove any quotes
280-
let base_dir = file_path.parent().unwrap_or(Path::new(""));
281-
let full_path = base_dir.join(path_str);
282-
full_path.canonicalize().unwrap_or(full_path)
283-
})
280+
re.captures(contents).and_then(|cap| cap.get(1)).map(|m| {
281+
let path_str = m.as_str().trim().replace('\"', ""); // Remove any quotes
282+
let base_dir = file_path.parent().unwrap_or(Path::new(""));
283+
let full_path = base_dir.join(path_str);
284+
full_path.canonicalize().unwrap_or(full_path)
285+
})
284286
}
285287

286-
287288
pub fn read_manifest(file_path: &PathBuf) -> Result<Manifest, ReadManifestError> {
288289
let mut file = File::open(file_path)?;
289290
let mut contents = String::new();

core/src/start.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ use crate::{
1717
start::{start_indexing, StartIndexingError},
1818
ContractEventDependencies, ContractEventDependenciesMapFromRelationshipsError,
1919
},
20-
load_env_from_project_path,
2120
manifest::{
2221
core::ProjectType,
2322
storage::RelationshipsAndIndexersError,

0 commit comments

Comments
 (0)