ChainSafe / ChainSafe/forest

Weird TryFrom impl for AnyCar (and probably other types?)

Open
#3,452 0 comments 0 reactions 0 assignees View on GitHub
Priority: 3 - Medium Type: Enhancement
Dominant language
Rust
Stars
697
Forks
200
Avg merge
1d 3h
Merged PRs (30d)
69

Description

https://github.com/ChainSafe/forest/blob/7e8d98141051d18996200ec3617a9b4e60c11620/src/db/car/any.rs#L100

This is not a sensible pattern - TryFrom is for _conversion_, not for effectful operations like opening files.

E.g `std::fs::File::open` not `impl TryFrom<&Path> for std::fs::File`...

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.