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
|
Index: tokio/Cargo.toml
===================================================================
--- tokio.orig/Cargo.toml
+++ tokio/Cargo.toml
@@ -671,3 +671,0 @@
-[dev-dependencies.mockall]
-version = "0.13.0"
-
Index: tokio/src/fs/file.rs
===================================================================
--- tokio.orig/src/fs/file.rs
+++ tokio/src/fs/file.rs
@@ -16,17 +16,17 @@ use std::pin::Pin;
use std::sync::Arc;
use std::task::{ready, Context, Poll};
-#[cfg(test)]
+/*#[cfg(test)]
use super::mocks::JoinHandle;
#[cfg(test)]
use super::mocks::MockFile as StdFile;
#[cfg(test)]
-use super::mocks::{spawn_blocking, spawn_mandatory_blocking};
-#[cfg(not(test))]
+use super::mocks::{spawn_blocking, spawn_mandatory_blocking};*/
+//#[cfg(not(test))]
use crate::blocking::JoinHandle;
-#[cfg(not(test))]
+//#[cfg(not(test))]
use crate::blocking::{spawn_blocking, spawn_mandatory_blocking};
-#[cfg(not(test))]
+//#[cfg(not(test))]
use std::fs::File as StdFile;
/// A reference to an open file on the filesystem.
@@ -974,5 +974,5 @@ impl Inner {
}
}
-#[cfg(test)]
-mod tests;
+//#[cfg(test)]
+//mod tests;
Index: tokio/src/fs/mod.rs
===================================================================
--- tokio.orig/src/fs/mod.rs
+++ tokio/src/fs/mod.rs
@@ -277,8 +277,8 @@ pub use self::copy::copy;
mod try_exists;
pub use self::try_exists::try_exists;
-#[cfg(test)]
-mod mocks;
+//#[cfg(test)]
+//mod mocks;
feature! {
#![unix]
@@ -297,10 +297,10 @@ cfg_windows! {
use std::io;
-#[cfg(not(test))]
+//#[cfg(not(test))]
use crate::blocking::spawn_blocking;
-#[cfg(test)]
-use mocks::spawn_blocking;
+//#[cfg(test)]
+//use mocks::spawn_blocking;
pub(crate) async fn asyncify<F, T>(f: F) -> io::Result<T>
where
Index: tokio/src/fs/open_options.rs
===================================================================
--- tokio.orig/src/fs/open_options.rs
+++ tokio/src/fs/open_options.rs
@@ -3,11 +3,11 @@ use crate::fs::{asyncify, File};
use std::io;
use std::path::Path;
-#[cfg(test)]
+/*#[cfg(test)]
mod mock_open_options;
#[cfg(test)]
use mock_open_options::MockOpenOptions as StdOpenOptions;
-#[cfg(not(test))]
+#[cfg(not(test))]*/
use std::fs::OpenOptions as StdOpenOptions;
#[cfg(unix)]
Index: tokio/src/fs/read_dir.rs
===================================================================
--- tokio.orig/src/fs/read_dir.rs
+++ tokio/src/fs/read_dir.rs
@@ -10,13 +10,13 @@ use std::pin::Pin;
use std::sync::Arc;
use std::task::{ready, Context, Poll};
-#[cfg(test)]
+/*#[cfg(test)]
use super::mocks::spawn_blocking;
#[cfg(test)]
use super::mocks::JoinHandle;
-#[cfg(not(test))]
+#[cfg(not(test))]*/
use crate::blocking::spawn_blocking;
-#[cfg(not(test))]
+//#[cfg(not(test))]
use crate::blocking::JoinHandle;
const CHUNK_SIZE: usize = 32;
|