ferristseng / rust-ipfs-api

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

Associated consts #11

Closed icefoxen closed 6 years ago

icefoxen commented 6 years ago

Changed path() methods on the ApiRequest trait to PATH associated consts.

1) We may or may not want this; for now it works fine but in the future it may be less convenient? Also, associated consts are a fairly new feature (stabilized in Rust 1.20). On the upside, it IS simpler... 2) I accidentally made this incorporate PR #10 because I suck at git.

Addresses one of the issues discussed in #6

ferristseng commented 6 years ago

I like this, and I would have used associated consts had I known they existed. I want to hold off on #10 for now because I'm not sure it is necessary, and may add to build times.

icefoxen commented 6 years ago

Reverted the stray commit, so should be good now. Sorry for polluting the git history, but there's only so many times I can find-and-replace a pattern before it starts to get old, and only so many times I can blow up my repo before git rebase seems like more trouble than it's worth.

Just checked the build times, it's 81 seconds without the derives, 86 seconds with them (it's a slow computer). So, live and learn I guess.

ferristseng commented 6 years ago

No worries about the git history, thank you for this! I really appreciate it.