Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(starknet_api): rely on env::current_dir() instead of CARGO_MANIFEST_DIR #2450

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading