h3poteto / megalodon-rs

Fediverse API client library for Rust
Apache License 2.0
106 stars 24 forks source link

implement From instead of Into #208

Closed joshka closed 4 months ago

joshka commented 4 months ago

refactor: implement from instead of Into

https://doc.rust-lang.org/std/convert/trait.Into.html

One should avoid implementing Into and implement From instead. Implementing From automatically provides one with an implementation of Into thanks to the blanket implementation in the standard library.