From 9ea84aeed4ed3006eddb6a7b24e9714f2844cd22 Mon Sep 17 00:00:00 2001 From: Niko Matsakis Date: Wed, 18 Feb 2015 14:48:57 -0500 Subject: Replace all uses of `&foo[]` with `&foo[..]` en masse. --- src/rustbook/build.rs | 2 +- src/rustbook/error.rs | 4 ++-- src/rustbook/test.rs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src/rustbook') diff --git a/src/rustbook/build.rs b/src/rustbook/build.rs index 6f5fc5c1969..224f1ef1a8b 100644 --- a/src/rustbook/build.rs +++ b/src/rustbook/build.rs @@ -92,7 +92,7 @@ fn render(book: &Book, tgt: &Path) -> CliResult<()> { { let urls = markdown_data.replace(".md)", ".html)"); try!(File::create(&preprocessed_path) - .write_str(&urls[])); + .write_str(&urls[..])); } // write the prelude to a temporary HTML file for rustdoc inclusion diff --git a/src/rustbook/error.rs b/src/rustbook/error.rs index 1c10a270acc..43c882c7d5b 100644 --- a/src/rustbook/error.rs +++ b/src/rustbook/error.rs @@ -52,7 +52,7 @@ impl<'a> Error for &'a str { impl Error for String { fn description<'a>(&'a self) -> &'a str { - &self[] + &self[..] } } @@ -75,7 +75,7 @@ impl Error for IoError { self.desc } fn detail(&self) -> Option<&str> { - self.detail.as_ref().map(|s| &s[]) + self.detail.as_ref().map(|s| &s[..]) } } diff --git a/src/rustbook/test.rs b/src/rustbook/test.rs index d3cb8a7316e..c5d4875423a 100644 --- a/src/rustbook/test.rs +++ b/src/rustbook/test.rs @@ -65,7 +65,7 @@ impl Subcommand for Test { } Err(errors) => { for err in errors { - term.err(&err[]); + term.err(&err[..]); } return Err(box "There was an error." as Box); } -- cgit 1.4.1-3-g733a5