Skip to content

Commit

Permalink
Fix tokio tests
Browse files Browse the repository at this point in the history
  • Loading branch information
someguynamedjosh committed Apr 17, 2023
1 parent c30f215 commit 8e32565
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
5 changes: 3 additions & 2 deletions examples/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,12 @@ rustdoc-args = ["--document-private-items"]
default = []
# Disables any tests that are not compatible or not intended to run under Miri
miri = []
__tokio = ["tokio"]
std = []
__tokio = ["tokio", "std"]

[dependencies]
ouroboros = { version = "0.15.7", path = "../ouroboros" }
tokio = { version = "1.25.0", features = [ "macros", "rt" ], optional = true }
tokio = { version = "1.27.0", features = [ "macros", "rt" ], optional = true }

[dev-dependencies]
rustversion = "1.0.11"
Expand Down
3 changes: 2 additions & 1 deletion examples/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#![no_std]
#![cfg_attr(not(feature = "std"), no_std)]

extern crate alloc;
use alloc::boxed::Box;

Expand Down
1 change: 1 addition & 0 deletions examples/src/ok_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ fn box_and_ref() {
#[cfg(all(not(feature = "miri"), feature = "tokio"))]
#[tokio::test]
async fn async_new() {
use std::future::Future;
let bar = BoxAndRefAsyncBuilder {
data: 12,
dref_builder: |data| Box::pin(async move { data }),
Expand Down

0 comments on commit 8e32565

Please sign in to comment.