Merge pull request #390 from ebfe/fix-build-master

Fix build with rust master
This commit is contained in:
Alex Lyon 2014-09-16 18:18:59 -07:00
commit 7f963dca4a
7 changed files with 13 additions and 13 deletions

2
deps/rust-crypto vendored

@ -1 +1 @@
Subproject commit 44317cac3c4b36a95ebd5654acbf0e1fff9c4b2e
Subproject commit 25a54b4342900193ace379f26655e714348203e1

View file

@ -221,7 +221,7 @@ fn print_usage(arg0: &str, opts: &[getopts::OptGroup], errmsg: &str) {
// uniform interface for opening files
// since we don't need seeking
type FileOrStdReader = BufferedReader<Box<Reader>>;
type FileOrStdReader = BufferedReader<Box<Reader+'static>>;
fn open_file(filename: &str) -> IoResult<FileOrStdReader> {
if filename == "-" {

View file

@ -20,7 +20,7 @@ struct BreakArgs<'a> {
indent_str : &'a str,
indent_len : uint,
uniform : bool,
ostream : &'a mut Box<Writer>
ostream : &'a mut Box<Writer+'static>
}
impl<'a> BreakArgs<'a> {
@ -38,7 +38,7 @@ impl<'a> BreakArgs<'a> {
}
}
pub fn break_lines(para: &Paragraph, opts: &FmtOptions, ostream: &mut Box<Writer>) {
pub fn break_lines(para: &Paragraph, opts: &FmtOptions, ostream: &mut Box<Writer+'static>) {
// indent
let pIndent = para.indent_str.as_slice();
let pIndentLen = para.indent_len;

View file

@ -15,7 +15,7 @@
extern crate regex;
extern crate crypto = "rust-crypto";
extern crate "rust-crypto" as crypto;
extern crate getopts;
use std::io::fs::File;

View file

@ -7,7 +7,7 @@ fn parse_style(chars: &[char]) -> Result<::NumberingStyle, String> {
['a'] => { Ok(::NumberForAll) },
['t'] => { Ok(::NumberForNonEmpty) },
['n'] => { Ok(::NumberForNone) },
['p', ..rest] => {
['p', rest..] => {
match regex::Regex::new(String::from_chars(rest).as_slice()) {
Ok(re) => Ok(::NumberForRegularExpression(re)),
Err(_) => Err(String::from_str("Illegal regular expression")),

View file

@ -91,7 +91,7 @@ fn tee(options: Options) -> Result<(), ()> {
}
}
fn open(path: &Path, append: bool) -> Box<Writer> {
fn open(path: &Path, append: bool) -> Box<Writer+'static> {
let inner = if *path == Path::new("-") {
box stdout() as Box<Writer>
} else {
@ -105,7 +105,7 @@ fn open(path: &Path, append: bool) -> Box<Writer> {
}
struct NamedWriter {
inner: Box<Writer>,
inner: Box<Writer+'static>,
path: Box<Path>
}
@ -132,7 +132,7 @@ impl Writer for NamedWriter {
}
struct NamedReader {
inner: Box<Reader>
inner: Box<Reader+'static>
}
impl Reader for NamedReader {

View file

@ -46,11 +46,11 @@ fn unescape(v: Vec<char>) -> Vec<char> {
let mut input = v.as_slice();
loop {
input = match input {
['\\', e, ..rest] => {
['\\', e, rest..] => {
out.push(unescape_char(e));
rest
}
[c, ..rest] => {
[c, rest..] => {
out.push(c);
rest
}
@ -71,11 +71,11 @@ fn expand_set(s: &str) -> Vec<char> {
loop {
input = match input {
[f, '-', t, ..rest] => {
[f, '-', t, rest..] => {
set.push_all(expand_range(f, t).as_slice());
rest
}
[c, ..rest] => {
[c, rest..] => {
set.push(c);
rest
}