Skip to content

Instantly share code, notes, and snippets.

@erickt
erickt / a.rs
Created September 10, 2016 22:38
#[async]
fn long_running_future(timer: Timer, a: u64) -> impl Future<Item=u64, Error=TimerError> {
for i in 0..10 {
let sleep_time = i * a;
if i % 2 == 0 {
println!("sleeping {}: {}", i, sleep_time);
await!(timer.sleep(Duration::from_millis(sleep_time)));
}
}
Manishearth>
o/
8:51 AM E<erickt> Erick Tryzelaar
T-9 minutes!
8:52 AM so who will here for the meeting?
8:52 AM → aepsil0n joined ([email protected])
8:52 AM E— erickt waves at aepsil0n
8:52 AM A— aepsil0n waves back.
8:53 AM → doppioslash joined ([email protected])
Manishearth>
o/
8:51 AM E<erickt> Erick Tryzelaar
T-9 minutes!
8:52 AM so who will here for the meeting?
8:52 AM → aepsil0n joined ([email protected])
8:52 AM E— erickt waves at aepsil0n
8:52 AM A— aepsil0n waves back.
8:53 AM → doppioslash joined ([email protected])
#[generator]
fn gen_ints() -> usize {
let mut state = State1;
loop {
match state {
State1 => {
state = State2;
return Some(1);
}
State2 => {
error: unresolved name `y` [--explain E0425]
--> tests/test_generator.rs:13:9
|>
13 |> y + 1
|> ^

Thank you very much for taking the time to fill out the survey. We really appreciate the time you've taken to contribute, and the information you have provided will help us evolve and expand the use of Rust, our ecosystem, and our community.

Please feel free to email the Rust Community team at [email protected] if you have any more questions about the survey.

Announcement:

With Rust's first birthday party upon us on May 15th, 2016, we should take this opportunity to reflect on where we've been, and where we're going. To celebrate, we are pleased to announce the official 2016 State of the Rust Language Survey! Whether or not you use Rust today, we want to to know your opinions. Your responses will help the project understand its strengths and weaknesses, and to establish development priorities for the future.

The 2016 State of Rust Survey

Completing this survey should take about 5 to 10 minutes. We will be accepting submissions until June 8th, 2016.

Please help us spread the word by sharing the above link on your social network feeds, at meetups, and around your office and other communities.

#![feature(plugin, custom_derive)]
#![plugin(serde_macros)]
extern crate serde;
extern crate serde_json;
use std::error::Error;
use serde::de::Error as SerdeError;
use serde_json::Value;
from __future__ import absolute_import
import logging
from kombu.five import Empty
from kombu.transport import virtual
from kombu.utils import cached_property
from kombu.utils.compat import OrderedDict
from anyjson import loads, dumps
Compiling foo v0.1.0 (file:///private/tmp/foo)
Running `target/debug/foo`
{"map":{"0":"zero","1":"one"}}
Foo { map: {0: "zero", 1: "one"} }