Closed tcharding closed 2 years ago
I think, now that we have SliceIndex
, we could just inline this and drop the macro entirely. It's a bit duplicative but not nearly as bad as the 1.0-era "implement four different Index
traits" code.
BTW - this is a breaking change because we exported this macro and downstream users may have been using it :(
Do we need to add a label to this to remind us we broke the API?
I think it'll be okay -- we'll go over all the merged PRs when making the changelog for the next release.
Since we bumped to Rust 1.29 it has not been necessary to implement
Index
manually, we can get it by way of theSliceIndex
trait.Implement
Index
usingSliceIndex
. Keep the declarative macro so we only have to write theSliceIndex
implementation once.This is in the same vein as https://github.com/rust-bitcoin/rust-bitcoin/pull/805 but goes about it in a slightly different manner, we should probably be uniform across both crates. I'm unsure which is the best option?