Remove dead code from internals

This commit is contained in:
Jack Grigg
2019-11-21 13:12:46 +00:00
parent 6e24660a80
commit 7412c02892
+1 -17
View File
@@ -30,8 +30,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// TODO(tarcieri): investigate and remove dead code
#![allow(non_upper_case_globals, dead_code)]
#![allow(non_upper_case_globals)]
#![allow(clippy::missing_safety_doc)]
use crate::consts::*;
@@ -51,10 +50,6 @@ impl DesKey {
pub fn from_bytes(bytes: [u8; DES_LEN_3DES]) -> Self {
DesKey(bytes)
}
pub fn write(&self, out: &mut [u8]) {
out.copy_from_slice(&self.0);
}
}
impl AsRef<[u8; 24]> for DesKey {
@@ -150,17 +145,6 @@ pub fn yk_des_is_weak_key(key: &[u8; DES_LEN_3DES]) -> bool {
rv
}
/// PKCS#5 error types
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
#[repr(i32)]
pub enum Pkcs5ErrorKind {
/// OK
Ok = 0,
/// General error
GeneralError = -1,
}
/// Source of how a setting was configured
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
pub enum SettingSource {