Skip to content

Commit

Permalink
feat(blockifier): replace TryFrom<&Path> for VC with ad-hoc function (#…
Browse files Browse the repository at this point in the history
…973)

Signed-off-by: Dori Medini <[email protected]>
  • Loading branch information
dorimedini-starkware authored Sep 24, 2024
1 parent e04b7af commit 26411d6
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions crates/blockifier/src/versioned_constants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -262,12 +262,8 @@ impl VersionedConstants {
..Self::latest_constants().clone()
}
}
}

impl TryFrom<&Path> for VersionedConstants {
type Error = VersionedConstantsError;

fn try_from(path: &Path) -> Result<Self, Self::Error> {
pub fn from_path(path: &Path) -> Result<Self, VersionedConstantsError> {
Ok(serde_json::from_reader(std::fs::File::open(path)?)?)
}
}
Expand Down

0 comments on commit 26411d6

Please sign in to comment.