I hereby claim:
- I am tesaguri on github.
- I am tesaguri (https://keybase.io/tesaguri) on keybase.
- I have a public key whose fingerprint is 293A DA14 A1CB 0B1C 2313 3101 1047 8E59 8B94 4AA2
To claim this, I am signing this object:
# The arrays should not contain nil. | |
ary1 = [1, 2] | |
ary2 = %w(A B C) | |
ary3 = %i(a b) | |
while (elm = ary1.shift || ary2.shift || ary3.shift) do | |
p elm | |
end | |
#=> 1 | |
#=> 2 |
use std::mem; | |
struct RecRel<T,F> { | |
val: T, | |
succ: F, | |
} | |
impl<T,F> RecRel<T,F> { | |
fn new(init: T, succ: F) -> Self where F: Fn(&T) -> T { | |
RecRel { |
[package] | |
name = "ikeay_011_BOT-rs" | |
version = "0.1.0" | |
[dependencies] | |
futures = "0.1" | |
serde_json = "1" | |
tokio-core = "0.1" | |
tweetust = "0.7" | |
twitter-stream = { git = "https://github.com/dmizuk/twitter-stream-rs", features = ["tweetust"] } |
[package] | |
name = "ikeay_011_BOT-rs" | |
version = "0.1.0" | |
[dependencies] | |
egg-mode = "0.8" | |
futures = "0.1" | |
serde_json = "1" | |
tokio-core = "0.1" | |
twitter-stream = { git = "https://github.com/dmizuk/twitter-stream-rs", features = ["egg-mode"] } |
#![feature(test)] | |
extern crate test; | |
use std::collections::HashMap; | |
use test::Bencher; | |
const KEY0: &str = "A benchmark test"; | |
const KEY1: &str = "for"; | |
const KEY2: &str = "`Box<str>` and `String`"; |
use std::any::TypeId; | |
use std::mem; | |
#[derive(Debug)] | |
pub struct Untyped { | |
type_id: TypeId, | |
data: *mut [()], | |
} | |
impl Untyped { |
use std::fmt::{self, Display, Formatter, Write}; | |
pub struct Uppercase<T>(T); | |
impl<T: Display> Display for Uppercase<T> { | |
fn fmt(&self, f: &mut Formatter) -> fmt::Result { | |
struct Adapter<'a, 'b: 'a>(&'a mut Formatter<'b>); | |
impl<'a, 'b: 'a> Write for Adapter<'a, 'b> { | |
fn write_str(&mut self, s: &str) -> fmt::Result { |
I hereby claim:
To claim this, I am signing this object:
#![feature(specialization)] | |
// #![feature(min_specialization)] // error: cannot specialize on trait `Debug` | |
use core::fmt::{self, Debug, Formatter}; | |
#[test] | |
#[should_panic( | |
expected = "called `Result::unwrap_any()` on an `Err` value: playground::unwrap_non_debug::NonDebug" | |
)] | |
fn unwrap_non_debug() { |
macro_rules! request { | |
( | |
@parsing $(#[$attrs:meta])*; #[get($uri:expr)] $(#[$rest_attrs:meta])* | |
struct $Name:ident; | |
$($rest:tt)* | |
) => { | |
request! { | |
@GET($uri) | |
$(#[$attrs])* | |
$(#[$rest_attrs])* |