From 2bc3bf607638e388f510146b127f6b526a7793fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timoth=C3=A9e=20Delabrouille?= Date: Wed, 31 Jul 2024 10:09:43 +0200 Subject: [PATCH] fix: replace impl From<&Path> with an ad-hoc method --- 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 a975ab0e98..93cf08b0d5 100644 --- a/crates/blockifier/src/versioned_constants.rs +++ b/crates/blockifier/src/versioned_constants.rs @@ -251,12 +251,8 @@ impl VersionedConstants { }; Self { validate_max_n_steps, max_recursion_depth, ..base_overrides } } -} - -impl TryFrom<&Path> for VersionedConstants { - type Error = VersionedConstantsError; - fn try_from(path: &Path) -> Result { + pub fn new_from_path_to_json_file(path: &Path) -> Result { Ok(serde_json::from_reader(std::fs::File::open(path)?)?) } }