diff --git a/CHANGELOG.md b/CHANGELOG.md index e0c2d08..9058311 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +# (Unreleased) + +* Remove `ops::Index` implementations for `Signature` + # 0.11.4 - 2018-11-04 * Add `FromStr` and `Display` for `Signature` and both key types diff --git a/src/lib.rs b/src/lib.rs index 81cbc57..e29f2c8 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -142,7 +142,7 @@ pub extern crate libc; use libc::size_t; -use std::{error, fmt, ops, ptr, str}; +use std::{error, fmt, ptr, str}; #[cfg(any(test, feature = "rand"))] use rand::Rng; #[macro_use] @@ -442,42 +442,6 @@ impl From for RecoverableSignature { } } -impl ops::Index for Signature { - type Output = u8; - - #[inline] - fn index(&self, index: usize) -> &u8 { - &self.0[index] - } -} - -impl ops::Index> for Signature { - type Output = [u8]; - - #[inline] - fn index(&self, index: ops::Range) -> &[u8] { - &self.0[index] - } -} - -impl ops::Index> for Signature { - type Output = [u8]; - - #[inline] - fn index(&self, index: ops::RangeFrom) -> &[u8] { - &self.0[index.start..] - } -} - -impl ops::Index for Signature { - type Output = [u8]; - - #[inline] - fn index(&self, _: ops::RangeFull) -> &[u8] { - &self.0[..] - } -} - #[cfg(feature = "serde")] impl ::serde::Serialize for Signature { fn serialize(&self, s: S) -> Result {