Skip to content

Commit fcc220f

Browse files
committed
switch to futures-lite
Signed-off-by: Marc-Antoine Perennou <[email protected]>
1 parent d4c3993 commit fcc220f

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

Cargo.toml

+2
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ default = [
2727
"async-io",
2828
"async-task",
2929
"blocking",
30+
"futures-lite",
3031
"kv-log-macro",
3132
"log",
3233
"num_cpus",
@@ -81,6 +82,7 @@ surf = { version = "1.0.3", optional = true }
8182
[target.'cfg(not(target_os = "unknown"))'.dependencies]
8283
async-io = { version = "0.1.5", optional = true }
8384
blocking = { version = "0.5.0", optional = true }
85+
futures-lite = { version = "0.1.8", optional = true }
8486
smol = { version = "0.1.17", optional = true }
8587

8688
[target.'cfg(target_arch = "wasm32")'.dependencies]

src/fs/file.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ impl Drop for File {
315315
// non-blocking fashion, but our only other option here is losing data remaining in the
316316
// write cache. Good task schedulers should be resilient to occasional blocking hiccups in
317317
// file destructors so we don't expect this to be a common problem in practice.
318-
let _ = smol::block_on(self.flush());
318+
let _ = futures_lite::future::block_on(self.flush());
319319
}
320320
}
321321

src/task/builder.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ impl Builder {
169169
// The first call should use run.
170170
smol::run(wrapped)
171171
} else {
172-
smol::block_on(wrapped)
172+
futures_lite::future::block_on(wrapped)
173173
};
174174
num_nested_blocking.replace(num_nested_blocking.get() - 1);
175175
res

0 commit comments

Comments
 (0)