about summary refs log tree commit diff
path: root/src/rustc/metadata/decoder.rs
diff options
context:
space:
mode:
authorBrian Anderson <banderson@mozilla.com>2012-09-21 19:37:57 -0700
committerBrian Anderson <banderson@mozilla.com>2012-09-23 17:15:00 -0700
commit4a78f9b16620489855da93c19be56f59431416f6 (patch)
tree4b164738698203f474003682d5f0a5e23aa13377 /src/rustc/metadata/decoder.rs
parent92752a462a055d6478bd96dab37a740514992106 (diff)
downloadrust-4a78f9b16620489855da93c19be56f59431416f6.tar.gz
rust-4a78f9b16620489855da93c19be56f59431416f6.zip
core: Demode option
Diffstat (limited to 'src/rustc/metadata/decoder.rs')
-rw-r--r--src/rustc/metadata/decoder.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/rustc/metadata/decoder.rs b/src/rustc/metadata/decoder.rs
index 51c6b6148ce..181b8c6f104 100644
--- a/src/rustc/metadata/decoder.rs
+++ b/src/rustc/metadata/decoder.rs
@@ -92,7 +92,7 @@ fn maybe_find_item(item_id: int, items: ebml::Doc) -> Option<ebml::Doc> {
 }
 
 fn find_item(item_id: int, items: ebml::Doc) -> ebml::Doc {
-    return option::get(maybe_find_item(item_id, items));
+    return maybe_find_item(item_id, items).get();
 }
 
 // Looks up an item in the given metadata and returns an ebml doc pointing
@@ -202,7 +202,7 @@ fn each_reexport(d: ebml::Doc, f: fn(ebml::Doc) -> bool) {
 fn field_mutability(d: ebml::Doc) -> ast::class_mutability {
     // Use maybe_get_doc in case it's a method
     option::map_default(
-        ebml::maybe_get_doc(d, tag_class_mut),
+        &ebml::maybe_get_doc(d, tag_class_mut),
         ast::class_immutable,
         |d| {
             match ebml::doc_as_u8(d) as char {
@@ -213,7 +213,7 @@ fn field_mutability(d: ebml::Doc) -> ast::class_mutability {
 }
 
 fn variant_disr_val(d: ebml::Doc) -> Option<int> {
-    do option::chain(ebml::maybe_get_doc(d, tag_disr_val)) |val_doc| {
+    do option::chain(&ebml::maybe_get_doc(d, tag_disr_val)) |val_doc| {
         int::parse_bytes(ebml::doc_data(val_doc), 10u)
     }
 }
@@ -384,7 +384,7 @@ fn get_impl_method(intr: ident_interner, cdata: cmd, id: ast::node_id,
             found = Some(translate_def_id(cdata, m_did));
         }
     }
-    option::get(found)
+    found.get()
 }
 
 fn get_class_method(intr: ident_interner, cdata: cmd, id: ast::node_id,