ferristseng / rust-ipfs-api

IPFS HTTP client in Rust
Apache License 2.0
247 stars 68 forks source link

Derive Debug for IpfsClient #44

Closed Jannis closed 4 years ago

Jannis commented 4 years ago

Both awc::Client and hyper::client::Client support Debug, allowing to derive Debug for IpfsClient as well. This makes it possible to print clients like with

println!("Client: {:?}", IpfsClient::default());

which, with hyper, will output something like this:

Client: IpfsClient { base: http://127.0.0.1:5001/api/v0, client: Client }
Jannis commented 4 years ago

Seems like awc::Client does not implement Debug after all. I thought it did because the ipfs-api test suite built and tested fine.