Skip to content

Commit

Permalink
fix: replace impl From<&Path> with an ad-hoc method
Browse files Browse the repository at this point in the history
  • Loading branch information
tdelabro committed Jul 31, 2024
1 parent 0a4d9c2 commit 2bc3bf6
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 @@ -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<Self, Self::Error> {
pub fn new_from_path_to_json_file(path: &Path) -> Result<Self, VersionedConstantsError> {
Ok(serde_json::from_reader(std::fs::File::open(path)?)?)
}
}
Expand Down

0 comments on commit 2bc3bf6

Please sign in to comment.