Skip to content

Instantly share code, notes, and snippets.

View Torwegia's full-sized avatar
🐻
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa

Torbjorn Loken Torwegia

🐻
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
View GitHub Profile
use std::to_str::*;
pub trait Component : Clone {
}
#[deriving(Clone)]
pub struct TextRenderable {
sigil: char,
fg: uint,
bg: uint,
@Torwegia
Torwegia / movedValue.rs
Created December 4, 2013 06:40
Why does the first one work, but not the second? The compiler complains of a capture of a moved value.
fn works() {
let (port, chan): (Port<int>, Chan<int>) = stream();
do spawn {
chan.send(42);
}
println(port.recv().to_str());
}