From 611737cbc68a3bb18a4762d128085ef1e8ecdfbe Mon Sep 17 00:00:00 2001 From: Itay Tsabary Date: Wed, 4 Dec 2024 15:06:56 +0200 Subject: [PATCH] chore(starknet_api): rely on env::current_dir() instead of CARGO_MANIFEST_DIR commit-id:301ed4eb --- Cargo.lock | 3 +-- crates/starknet_api/Cargo.toml | 5 +---- crates/starknet_api/src/test_utils.rs | 3 +-- 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index b01906f227..d36ee0baec 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,6 +1,6 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 3 +version = 4 [[package]] name = "Inflector" @@ -10226,7 +10226,6 @@ dependencies = [ "derive_more 0.99.18", "hex", "indexmap 2.6.0", - "infra_utils", "itertools 0.12.1", "num-bigint 0.4.6", "pretty_assertions", diff --git a/crates/starknet_api/Cargo.toml b/crates/starknet_api/Cargo.toml index 4fd905b38c..e04f457c96 100644 --- a/crates/starknet_api/Cargo.toml +++ b/crates/starknet_api/Cargo.toml @@ -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 @@ -35,8 +34,6 @@ thiserror.workspace = true assert_matches.workspace = true rstest.workspace = true -[package.metadata.cargo-machete] -ignored = ["strum"] [lints] workspace = true diff --git a/crates/starknet_api/src/test_utils.rs b/crates/starknet_api/src/test_utils.rs index 2addfd0ae3..87ba2be4fd 100644 --- a/crates/starknet_api/src/test_utils.rs +++ b/crates/starknet_api/src/test_utils.rs @@ -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; @@ -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>(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.