about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/librustc/metadata/cstore.rs10
-rw-r--r--src/librustdoc/clean.rs7
-rw-r--r--src/libsyntax/parse/token.rs7
3 files changed, 3 insertions, 21 deletions
diff --git a/src/librustc/metadata/cstore.rs b/src/librustc/metadata/cstore.rs
index 45eccc94ed8..33625000e4a 100644
--- a/src/librustc/metadata/cstore.rs
+++ b/src/librustc/metadata/cstore.rs
@@ -215,15 +215,7 @@ impl CStore {
             debug!("  hash[{}]: {}", x.name, x.hash);
         }
 
-        let mut hashes = ~[];
-        for ch in result.move_iter() {
-            let crate_hash {
-                hash,
-                ..
-            } = ch;
-            hashes.push(hash)
-        }
-        hashes
+        result.move_iter().map(|crate_hash { hash, ..}| hash).collect()
     }
 }
 
diff --git a/src/librustdoc/clean.rs b/src/librustdoc/clean.rs
index 4f7e6df95e1..94e5273fced 100644
--- a/src/librustdoc/clean.rs
+++ b/src/librustdoc/clean.rs
@@ -878,16 +878,13 @@ fn path_to_str(p: &ast::Path) -> ~str {
 
     let mut s = ~"";
     let mut first = true;
-    for i in p.segments.iter().map(|x| {
-            let string = token::get_ident(x.identifier.name);
-            string.get().to_str()
-    }) {
+    for i in p.segments.iter().map(|x| token::get_ident(x.identifier.name)) {
         if !first || p.global {
             s.push_str("::");
         } else {
             first = false;
         }
-        s.push_str(i);
+        s.push_str(i.get());
     }
     s
 }
diff --git a/src/libsyntax/parse/token.rs b/src/libsyntax/parse/token.rs
index c0abbb9222b..d6edccd33a4 100644
--- a/src/libsyntax/parse/token.rs
+++ b/src/libsyntax/parse/token.rs
@@ -554,13 +554,6 @@ pub struct InternedString {
     priv string: RcStr,
 }
 
-#[unsafe_destructor]
-impl Drop for InternedString {
-    fn drop(&mut self) {
-        // No-op just to make this not implicitly copyable.
-    }
-}
-
 impl InternedString {
     #[inline]
     pub fn new(string: &'static str) -> InternedString {