bssl-crypto: remove unused code.

The latest Rust toolchain has started flagging these (correctly) as
unused.

Change-Id: I702e0ac7bfe47c7546e44debf7f53c4ade8e5dd6
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/66328
Commit-Queue: Bob Beck <bbe@google.com>
Reviewed-by: Bob Beck <bbe@google.com>
Auto-Submit: Adam Langley <agl@google.com>
diff --git a/rust/bssl-crypto/src/lib.rs b/rust/bssl-crypto/src/lib.rs
index bb80ef4..5a6e58a 100644
--- a/rust/bssl-crypto/src/lib.rs
+++ b/rust/bssl-crypto/src/lib.rs
@@ -101,9 +101,6 @@
 /// See the comment [`FfiSlice`].
 trait FfiMutSlice {
     fn as_mut_ffi_ptr(&mut self) -> *mut u8;
-    fn as_ffi_void_ptr(&mut self) -> *mut c_void {
-        self.as_mut_ffi_ptr() as *mut c_void
-    }
 }
 
 impl FfiMutSlice for [u8] {
@@ -203,17 +200,6 @@
         unsafe { &*(ptr as *mut _) }
     }
 
-    /// Constructs a mutable reference of this type from its raw type.
-    ///
-    /// # Safety
-    ///
-    /// `ptr` must be a valid, unique, instance of the type for the `'a` lifetime.
-    #[inline]
-    unsafe fn from_ptr_mut<'a>(ptr: *mut Self::CType) -> &'a mut Self {
-        debug_assert!(!ptr.is_null());
-        unsafe { &mut *(ptr as *mut _) }
-    }
-
     /// Returns a raw pointer to the wrapped value.
     #[inline]
     fn as_ptr(&self) -> *mut Self::CType {
@@ -221,29 +207,6 @@
     }
 }
 
-/// A helper trait implemented by types which has an owned reference to foreign types.
-///
-/// # Safety
-///
-/// Implementations of `ForeignType` must guarantee the following:
-///
-/// - `Self::from_ptr(x).as_ptr() == x`
-unsafe trait ForeignType {
-    /// The raw C type.
-    type CType;
-
-    /// Constructs an instance of this type from its raw type.
-    ///
-    /// # Safety
-    ///
-    /// - `ptr` must be a valid, immutable, instance of `CType`.
-    /// - Ownership of `ptr` is passed to the implementation, and will free `ptr` when dropped.
-    unsafe fn from_ptr(ptr: *mut Self::CType) -> Self;
-
-    /// Returns a raw pointer to the wrapped value.
-    fn as_ptr(&self) -> *mut Self::CType;
-}
-
 /// Returns a BoringSSL structure that is initialized by some function.
 /// Requires that the given function completely initializes the value.
 ///