From 26411d60fd4a4f44a21be54ef7b7f40852c22e6d Mon Sep 17 00:00:00 2001 From: dorimedini-starkware Date: Tue, 24 Sep 2024 10:38:04 +0300 Subject: [PATCH] feat(blockifier): replace TryFrom<&Path> for VC with ad-hoc function (#973) Signed-off-by: Dori Medini --- crates/blockifier/src/versioned_constants.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/crates/blockifier/src/versioned_constants.rs b/crates/blockifier/src/versioned_constants.rs index 1ac9279637..3107516644 100644 --- a/crates/blockifier/src/versioned_constants.rs +++ b/crates/blockifier/src/versioned_constants.rs @@ -262,12 +262,8 @@ impl VersionedConstants { ..Self::latest_constants().clone() } } -} - -impl TryFrom<&Path> for VersionedConstants { - type Error = VersionedConstantsError; - fn try_from(path: &Path) -> Result { + pub fn from_path(path: &Path) -> Result { Ok(serde_json::from_reader(std::fs::File::open(path)?)?) } }