]> git.lizzy.rs Git - rust.git/commitdiff
remove more stage0 stuff
authorJorge Aparicio <japaricious@gmail.com>
Mon, 5 Jan 2015 21:19:15 +0000 (16:19 -0500)
committerJorge Aparicio <japaricious@gmail.com>
Mon, 5 Jan 2015 22:22:18 +0000 (17:22 -0500)
src/libserialize/json_stage0.rs

index 84180159c2be7a16a1ae07c47b8f17ff25b24eef..9932f8d0306b3a81de144241f66df5dd6eff4366 100644 (file)
@@ -1123,15 +1123,6 @@ pub fn as_null(&self) -> Option<()> {
     }
 }
 
-// NOTE(stage0): remove impl after a snapshot
-#[cfg(stage0)]
-impl<'a> ops::Index<&'a str, Json>  for Json {
-    fn index(&self, idx: & &str) -> &Json {
-        self.find(*idx).unwrap()
-    }
-}
-
-#[cfg(not(stage0))]  // NOTE(stage0): remove cfg after a snapshot
 impl<'a> ops::Index<&'a str>  for Json {
     type Output = Json;
 
@@ -1140,18 +1131,6 @@ fn index(&self, idx: & &str) -> &Json {
     }
 }
 
-// NOTE(stage0): remove impl after a snapshot
-#[cfg(stage0)]
-impl ops::Index<uint, Json> for Json {
-    fn index<'a>(&'a self, idx: &uint) -> &'a Json {
-        match self {
-            &Json::Array(ref v) => v.index(idx),
-            _ => panic!("can only index Json with uint if it is an array")
-        }
-    }
-}
-
-#[cfg(not(stage0))]  // NOTE(stage0): remove cfg after a snapshot
 impl ops::Index<uint> for Json {
     type Output = Json;