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::ffi::OsStr; | |
use std::process::Command; | |
use std::borrow::Cow; | |
use std::convert::Into; | |
pub fn exec_slurp<'a>(cmd: &'a str, args: &[&OsStr]) -> Cow<'a, str> { | |
println!("exec_slurp({}, {:?})", cmd, args); | |
Command::new(cmd) | |
.args(args) |
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::default::Default; | |
use std::num::Zero; | |
use std::slice::MutItems; | |
pub struct Matrix<T> { | |
values: Vec<T>, | |
rows: uint, | |
columns: uint, | |
} |
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
#![feature(if_let)] | |
extern crate arena; | |
use arena::TypedArena; | |
use std::cell::Cell; | |
use std::fmt; | |
type NodeRef<'a, T> = Cell<Option<&'a Node<'a, T>>>; |