diff --git a/src/fixture/dir.rs b/src/fixture/dir.rs index 10ba2bc..fb72374 100644 --- a/src/fixture/dir.rs +++ b/src/fixture/dir.rs @@ -217,7 +217,7 @@ impl TempDir { /// ``` pub fn into_persistent(self) -> Self { let path = match self.temp { - Inner::Temp(temp) => temp.into_path(), + Inner::Temp(temp) => temp.keep(), Inner::Persisted(path) => path, }; let temp = Inner::Persisted(path); diff --git a/src/fixture/file.rs b/src/fixture/file.rs index ed5a244..988ef4a 100644 --- a/src/fixture/file.rs +++ b/src/fixture/file.rs @@ -138,7 +138,7 @@ impl NamedTempFile { let mut temp = Inner::Persisted; ::std::mem::swap(&mut self.temp, &mut temp); if let Inner::Temp(temp) = temp { - _ = temp.into_path(); + _ = temp.keep(); } self