Remove old TmpKeyfile type
@@ -280,21 +280,6 @@ impl FromStr for PairType {
////////////////////////////////////////////////////////////////////////
-#[deprecated]
-struct TmpKeyfile {
- pub path: PathBuf,
-}
-
-impl Drop for TmpKeyfile {
- fn drop(&mut self) {
- if self.path.is_file() {
- let _ = fs::remove_file(&self.path);
- }
- }
-}
-
-////////////////////////////////////////////////////////////////////////
-
#[deprecated]
pub struct HabitatKey {
pair_type: PairType, // NOT A PAIR!!!!!!
@@ -709,35 +694,6 @@ mod tests {
}
}
- mod tmpkeyfile {
- use super::*;
-
- #[test]
- fn tmp_keyfile_delete_on_drop() {
- let cache = Builder::new().prefix("key_cache").tempdir().unwrap();
- let path = cache.path().join("mykey");
-
- {
- let tmp_keyfile = TmpKeyfile { path: path.clone() };
- File::create(&tmp_keyfile.path).unwrap();
- assert!(tmp_keyfile.path.is_file());
- }
- assert_eq!(path.is_file(), false);
- }
-
- #[test]
- fn tmp_keyfile_no_file_on_drop() {
- let cache = Builder::new().prefix("key_cache").tempdir().unwrap();
- let path = cache.path().join("mykey");
-
- {
- let tmp_keyfile = TmpKeyfile { path: path.clone() };
- assert_eq!(tmp_keyfile.path.is_file(), false);
- }
- assert_eq!(path.is_file(), false);
- }
- }
-
mod habitat_key {
use super::*;
