Skip to content

Instantly share code, notes, and snippets.

@jld
Created February 24, 2013 06:58
Show Gist options
  • Select an option

  • Save jld/5022947 to your computer and use it in GitHub Desktop.

Select an option

Save jld/5022947 to your computer and use it in GitHub Desktop.
…and there's more where that came from.
struct S { f0: ~str, f1: ~str }
fn main() {
let s = ~"Hello, world!";
let _s = S { f1: str::from_slice(s), f0: s };
io::println(_s.f0);
io::println(_s.f1);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment