about summary refs log tree commit diff
path: root/src/rustbook/error.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/rustbook/error.rs')
-rw-r--r--src/rustbook/error.rs4
1 files changed, 2 insertions, 2 deletions
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[..])
     }
 }