D | namedtempfile.rs | 16 let mut tmpfile = NamedTempFile::new().unwrap(); in test_basic() localVariable 17 write!(tmpfile, "abcde").unwrap(); in test_basic() 18 tmpfile.seek(SeekFrom::Start(0)).unwrap(); in test_basic() 20 tmpfile.read_to_string(&mut buf).unwrap(); in test_basic() 26 let tmpfile = NamedTempFile::new().unwrap(); in test_deleted() localVariable 27 let path = tmpfile.path().to_path_buf(); in test_deleted() 29 drop(tmpfile); in test_deleted() 35 let mut tmpfile = NamedTempFile::new().unwrap(); in test_persist() localVariable 36 let old_path = tmpfile.path().to_path_buf(); in test_persist() 38 write!(tmpfile, "abcde").unwrap(); in test_persist() [all …]
|