From 5405c291136000f14240da61b6e12b46efc827ef Mon Sep 17 00:00:00 2001 From: Michael Gehring Date: Wed, 10 Sep 2014 08:44:32 +0200 Subject: [PATCH 1/2] update rust-crypto --- deps/rust-crypto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deps/rust-crypto b/deps/rust-crypto index 44317cac3..25a54b434 160000 --- a/deps/rust-crypto +++ b/deps/rust-crypto @@ -1 +1 @@ -Subproject commit 44317cac3c4b36a95ebd5654acbf0e1fff9c4b2e +Subproject commit 25a54b4342900193ace379f26655e714348203e1 From 6b9831a091914ee0818f4b921be114a934230d2f Mon Sep 17 00:00:00 2001 From: Michael Gehring Date: Wed, 10 Sep 2014 08:26:42 +0200 Subject: [PATCH 2/2] Update for rust master --- src/fmt/fmt.rs | 2 +- src/fmt/linebreak.rs | 4 ++-- src/hashsum/hashsum.rs | 2 +- src/nl/helper.rs | 2 +- src/tee/tee.rs | 6 +++--- src/tr/tr.rs | 8 ++++---- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/fmt/fmt.rs b/src/fmt/fmt.rs index e16049873..29a088ab4 100644 --- a/src/fmt/fmt.rs +++ b/src/fmt/fmt.rs @@ -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>; +type FileOrStdReader = BufferedReader>; fn open_file(filename: &str) -> IoResult { if filename == "-" { diff --git a/src/fmt/linebreak.rs b/src/fmt/linebreak.rs index 33f5f9f88..9b51f2728 100644 --- a/src/fmt/linebreak.rs +++ b/src/fmt/linebreak.rs @@ -20,7 +20,7 @@ struct BreakArgs<'a> { indent_str : &'a str, indent_len : uint, uniform : bool, - ostream : &'a mut Box + ostream : &'a mut Box } impl<'a> BreakArgs<'a> { @@ -38,7 +38,7 @@ impl<'a> BreakArgs<'a> { } } -pub fn break_lines(para: &Paragraph, opts: &FmtOptions, ostream: &mut Box) { +pub fn break_lines(para: &Paragraph, opts: &FmtOptions, ostream: &mut Box) { // indent let pIndent = para.indent_str.as_slice(); let pIndentLen = para.indent_len; diff --git a/src/hashsum/hashsum.rs b/src/hashsum/hashsum.rs index 7df564448..f4ade0523 100644 --- a/src/hashsum/hashsum.rs +++ b/src/hashsum/hashsum.rs @@ -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; diff --git a/src/nl/helper.rs b/src/nl/helper.rs index c4717e60d..1a277fdd1 100644 --- a/src/nl/helper.rs +++ b/src/nl/helper.rs @@ -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")), diff --git a/src/tee/tee.rs b/src/tee/tee.rs index 1a6e6905b..0f6b6628d 100644 --- a/src/tee/tee.rs +++ b/src/tee/tee.rs @@ -91,7 +91,7 @@ fn tee(options: Options) -> Result<(), ()> { } } -fn open(path: &Path, append: bool) -> Box { +fn open(path: &Path, append: bool) -> Box { let inner = if *path == Path::new("-") { box stdout() as Box } else { @@ -105,7 +105,7 @@ fn open(path: &Path, append: bool) -> Box { } struct NamedWriter { - inner: Box, + inner: Box, path: Box } @@ -132,7 +132,7 @@ impl Writer for NamedWriter { } struct NamedReader { - inner: Box + inner: Box } impl Reader for NamedReader { diff --git a/src/tr/tr.rs b/src/tr/tr.rs index a57824e8b..bb111aa31 100644 --- a/src/tr/tr.rs +++ b/src/tr/tr.rs @@ -46,11 +46,11 @@ fn unescape(v: Vec) -> Vec { 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 { 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 }