summary refs log tree commit diff
path: root/src/comp/metadata
diff options
context:
space:
mode:
authorMarijn Haverbeke <marijnh@gmail.com>2011-10-10 13:54:03 +0200
committerMarijn Haverbeke <marijnh@gmail.com>2011-10-10 16:01:51 +0200
commit33167f7decfdc70c9dca6c41f80883f12c13cfbc (patch)
tree6a7b610fe6af5bd7e1ff81c54e63a580505f32d2 /src/comp/metadata
parentb4bae8fea5943a0b95a1a9be13a8155ee45418b7 (diff)
downloadrust-33167f7decfdc70c9dca6c41f80883f12c13cfbc.tar.gz
rust-33167f7decfdc70c9dca6c41f80883f12c13cfbc.zip
Adjust function signatures to allow for vecs being immediate
Some code was relying on vectors being implicitly by-reference (as
non-immediate value). This adds the necessary &&-sigils.

Closes #1021
Diffstat (limited to 'src/comp/metadata')
-rw-r--r--src/comp/metadata/common.rs2
-rw-r--r--src/comp/metadata/encoder.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/comp/metadata/common.rs b/src/comp/metadata/common.rs
index 134e43d6280..fdb2d72da6f 100644
--- a/src/comp/metadata/common.rs
+++ b/src/comp/metadata/common.rs
@@ -67,7 +67,7 @@ const tag_items_data_item_inlineness: uint = 0x27u;
 // djb's cdb hashes.
 fn hash_node_id(&&node_id: int) -> uint { ret 177573u ^ (node_id as uint); }
 
-fn hash_path(s: str) -> uint {
+fn hash_path(&&s: str) -> uint {
     let h = 5381u;
     for ch: u8 in str::bytes(s) { h = (h << 5u) + h ^ (ch as uint); }
     ret h;
diff --git a/src/comp/metadata/encoder.rs b/src/comp/metadata/encoder.rs
index f8145c306c8..7850b4139a1 100644
--- a/src/comp/metadata/encoder.rs
+++ b/src/comp/metadata/encoder.rs
@@ -425,7 +425,7 @@ fn encode_index<T>(ebml_w: ebml::writer, buckets: [@[entry<T>]],
     ebml::end_tag(ebml_w);
 }
 
-fn write_str(writer: io::writer, s: str) { writer.write_str(s); }
+fn write_str(writer: io::writer, &&s: str) { writer.write_str(s); }
 
 fn write_int(writer: io::writer, &&n: int) {
     writer.write_be_uint(n as uint, 4u);