Skip to content

Commit

Permalink
chore(starknet_api): rely on env::current_dir() instead of CARGO_MANI…
Browse files Browse the repository at this point in the history
…FEST_DIR

commit-id:301ed4eb
  • Loading branch information
Itay-Tsabary-Starkware committed Dec 4, 2024
1 parent 77232c5 commit 611737c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 8 deletions.
3 changes: 1 addition & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 1 addition & 4 deletions crates/starknet_api/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,11 @@ testing = []

[dependencies]
bitvec.workspace = true
cairo-lang-starknet-classes.workspace = true
cairo-lang-runner.workspace = true
cairo-lang-starknet-classes.workspace = true
derive_more.workspace = true
hex.workspace = true
indexmap = { workspace = true, features = ["serde"] }
infra_utils.workspace = true
itertools.workspace = true
num-bigint.workspace = true
pretty_assertions.workspace = true
Expand All @@ -35,8 +34,6 @@ thiserror.workspace = true
assert_matches.workspace = true
rstest.workspace = true

[package.metadata.cargo-machete]
ignored = ["strum"]

[lints]
workspace = true
3 changes: 1 addition & 2 deletions crates/starknet_api/src/test_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ use std::collections::HashMap;
use std::fs::read_to_string;
use std::path::{Path, PathBuf};

use infra_utils::path::cargo_manifest_dir;
use serde::{Deserialize, Serialize};
use serde_json::to_string_pretty;
use starknet_types_core::felt::Felt;
Expand All @@ -21,7 +20,7 @@ pub mod l1_handler;
/// directory has a `resources` folder. The value for file_path should be the path to the required
/// file in the folder "resources".
pub fn path_in_resources<P: AsRef<Path>>(file_path: P) -> PathBuf {
cargo_manifest_dir().unwrap().join("resources").join(file_path)
std::env::current_dir().unwrap().join("resources").join(file_path)
}

/// Reads from the directory containing the manifest at run time, same as current working directory.
Expand Down

0 comments on commit 611737c

Please sign in to comment.