File: replace-tempdir-with-tempfile.patch

package info (click to toggle)
rust-fs4 0.11.1-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 384 kB
  • sloc: makefile: 2
file content (143 lines) | stat: -rw-r--r-- 5,998 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
From: Maytham Alsudany <maytha8thedev@gmail.com>
Forwarded: https://github.com/al8n/fs4-rs/issues/8
Description: replace tempdir with tempfile
The tempdir crate has been deprecated in favour of tempfile.


--- a/Cargo.toml
+++ b/Cargo.toml
@@ -90,4 +90,4 @@
 
-[dev-dependencies.tempdir]
-version = "0.3"
+[dev-dependencies.tempfile]
+version = "3"
 
--- a/src/file_ext/sync_impl.rs
+++ b/src/file_ext/sync_impl.rs
@@ -90,3 +90,3 @@
         mod test {
-            extern crate tempdir;
+            extern crate tempfile;
             extern crate test;
@@ -106,3 +106,3 @@
             fn lock_shared() {
-                let tempdir = tempdir::TempDir::new("fs4").unwrap();
+                let tempdir = tempfile::tempdir().unwrap();
                 let path = tempdir.path().join("fs4");
@@ -151,3 +151,3 @@
             fn lock_exclusive() {
-                let tempdir = tempdir::TempDir::new("fs4").unwrap();
+                let tempdir = tempfile::tempdir().unwrap();
                 let path = tempdir.path().join("fs4");
@@ -187,3 +187,3 @@
             fn lock_cleanup() {
-                let tempdir = tempdir::TempDir::new("fs4").unwrap();
+                let tempdir = tempfile::tempdir().unwrap();
                 let path = tempdir.path().join("fs4");
@@ -218,3 +218,3 @@
             fn allocate() {
-                let tempdir = tempdir::TempDir::new("fs4").unwrap();
+                let tempdir = tempfile::tempdir().unwrap();
                 let path = tempdir.path().join("fs4");
@@ -250,3 +250,3 @@
             fn filesystem_space() {
-                let tempdir = tempdir::TempDir::new("fs4").unwrap();
+                let tempdir = tempfile::tempdir().unwrap();
                 let FsStats {
@@ -267,3 +267,3 @@
             fn bench_file_create(b: &mut test::Bencher) {
-                let tempdir = tempdir::TempDir::new("fs4").unwrap();
+                let tempdir = tempfile::tempdir().unwrap();
                 let path = tempdir.path().join("file");
@@ -286,3 +286,3 @@
                 let size = 32 * 1024 * 1024;
-                let tempdir = tempdir::TempDir::new("fs4").unwrap();
+                let tempdir = tempfile::tempdir().unwrap();
                 let path = tempdir.path().join("file");
@@ -306,3 +306,3 @@
                 let size = 32 * 1024 * 1024;
-                let tempdir = tempdir::TempDir::new("fs4").unwrap();
+                let tempdir = tempfile::tempdir().unwrap();
                 let path = tempdir.path().join("file");
@@ -326,3 +326,3 @@
                 let size = 32 * 1024 * 1024;
-                let tempdir = tempdir::TempDir::new("fs4").unwrap();
+                let tempdir = tempfile::tempdir().unwrap();
                 let path = tempdir.path().join("file");
@@ -345,3 +345,3 @@
             fn bench_lock_unlock(b: &mut test::Bencher) {
-                let tempdir = tempdir::TempDir::new("fs4").unwrap();
+                let tempdir = tempfile::tempdir().unwrap();
                 let path = tempdir.path().join("fs4");
@@ -364,3 +364,3 @@
             fn bench_free_space(b: &mut test::Bencher) {
-                let tempdir = tempdir::TempDir::new("fs4").unwrap();
+                let tempdir = tempfile::tempdir().unwrap();
                 b.iter(|| {
@@ -373,3 +373,3 @@
             fn bench_available_space(b: &mut test::Bencher) {
-                let tempdir = tempdir::TempDir::new("fs4").unwrap();
+                let tempdir = tempfile::tempdir().unwrap();
                 b.iter(|| {
@@ -382,3 +382,3 @@
             fn bench_total_space(b: &mut test::Bencher) {
-                let tempdir = tempdir::TempDir::new("fs4").unwrap();
+                let tempdir = tempfile::tempdir().unwrap();
                 b.iter(|| {
--- a/src/unix/sync_impl.rs
+++ b/src/unix/sync_impl.rs
@@ -59,3 +59,3 @@
         mod test {
-          extern crate tempdir;
+          extern crate tempfile;
 
@@ -71,3 +71,3 @@
           fn lock_replace() {
-              let tempdir = tempdir::TempDir::new("fs4").unwrap();
+              let tempdir = tempfile::tempdir().unwrap();
               let path = tempdir.path().join("fs4");
--- a/src/file_ext/async_impl.rs
+++ b/src/file_ext/async_impl.rs
@@ -104,3 +104,3 @@
         mod test {
-            extern crate tempdir;
+            extern crate tempfile;
             extern crate test;
@@ -118,3 +118,3 @@
             async fn lock_shared() {
-                let tempdir = tempdir::TempDir::new("fs4").unwrap();
+                let tempdir = tempfile::tempdir().unwrap();
                 let path = tempdir.path().join("fs4");
@@ -163,3 +163,3 @@
             async fn lock_exclusive() {
-                let tempdir = tempdir::TempDir::new("fs4").unwrap();
+                let tempdir = tempfile::tempdir().unwrap();
                 let path = tempdir.path().join("fs4");
@@ -199,3 +199,3 @@
             async fn lock_cleanup() {
-                let tempdir = tempdir::TempDir::new("fs4").unwrap();
+                let tempdir = tempfile::tempdir().unwrap();
                 let path = tempdir.path().join("fs4");
@@ -230,3 +230,3 @@
             async fn allocate() {
-                let tempdir = tempdir::TempDir::new("fs4").unwrap();
+                let tempdir = tempfile::tempdir().unwrap();
                 let path = tempdir.path().join("fs4");
@@ -262,3 +262,3 @@
             async fn filesystem_space() {
-                let tempdir = tempdir::TempDir::new("fs4").unwrap();
+                let tempdir = tempfile::tempdir().unwrap();
                 let total_space = total_space(tempdir.path()).unwrap();
--- a/src/unix/async_impl.rs
+++ b/src/unix/async_impl.rs
@@ -59,3 +59,3 @@
         mod test {
-          extern crate tempdir;
+          extern crate tempfile;
 
@@ -71,3 +71,3 @@
           async fn lock_replace() {
-              let tempdir = tempdir::TempDir::new("fs4").unwrap();
+              let tempdir = tempfile::tempdir().unwrap();
               let path = tempdir.path().join("fs4");