This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Place your key bindings in this file to overwrite the defaults | |
| [ | |
| { | |
| "key": "ctrl+tab", | |
| "command": "workbench.action.nextEditor" | |
| }, | |
| { | |
| "key": "ctrl+pagedown", | |
| "command": "-workbench.action.nextEditor" | |
| }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use std::future::Future; | |
| use std::pin::Pin; | |
| use std::task::{Poll, Context, Waker, RawWaker, RawWakerVTable}; | |
| use std::sync::mpsc::{sync_channel, Receiver}; | |
| use tokio::task::yield_now; | |
| macro_rules! gen_iter { | |
| ( | |
| @EMIT $yield_tx:ident | |
| [] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use std::convert::Infallible; | |
| use std::{error::Error, net::SocketAddr, time::{Instant, Duration}}; | |
| use hyper::{Body, Request, Response, Server}; | |
| use hyper::{body::Bytes, service::{make_service_fn, service_fn}}; | |
| use futures::prelude::*; | |
| use tokio::time::delay_for; | |
| #[tokio::main] | |
| async fn main() { | |
| let addr = SocketAddr::from(([0, 0, 0, 0], 7777)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| fn main() { | |
| let counter1 = Counter { name: "C1", counter: 3 }; | |
| let counter2 = Counter { name: "C2", counter: 5 }; | |
| let joined = join(counter1, counter2); | |
| block_on(joined); | |
| } | |
| fn block_on(mut future: impl Future) { | |
| loop { |
OlderNewer