making tests pass on windows

This commit is contained in:
Carl Fredrik Samson
2020-04-05 01:01:56 +02:00
parent 971288868b
commit 5ec0336d66
7 changed files with 29 additions and 26 deletions

View File

@@ -138,7 +138,7 @@ this:
> It's not in any way meant to showcase "best practice". Just so we're on
> the same page.
```rust
```rust, edition2018
#![feature(asm)]
#![feature(naked_functions)]
use std::ptr;
@@ -331,7 +331,7 @@ unsafe fn switch(old: *mut ThreadContext, new: *const ThreadContext) {
: "alignstack"
);
}
# #[cfg(not(windows))]
fn main() {
let mut runtime = Runtime::new();
runtime.init();
@@ -348,7 +348,8 @@ fn main() {
});
runtime.run();
}
# #[cfg(windows)]
# fn main() { }
```
Still hanging in there? Good. Don't get frustrated if the code above is
@@ -516,7 +517,7 @@ promise in the state `pending`.
Since promises are re-written as state machines they also enable an even better
syntax where we now can write our last example like this:
```
```js, ignore
async function run() {
await timer(200);
await timer(100);