dariusc93 / rust-ipfs

The InterPlanetary File System (IPFS), implemented in Rust.
Apache License 2.0
42 stars 8 forks source link

refactor: Support `Serialize` for `{Ipfs, IpldDag)::put_dag`. #249

Closed dariusc93 closed 4 months ago

dariusc93 commented 4 months ago

Previously, Ipfs::put_dag would only accept an Ipld and if one wish to provide any serde-compatible type, they would have to supply it to DagPut::serialize. After evaluating to_ipld from libipld, it is determined that we can change it to use to serde::Serialize instead.

This change would not be breaking since supplying a Ipld to to_ipld would return itself.