From 33167f7decfdc70c9dca6c41f80883f12c13cfbc Mon Sep 17 00:00:00 2001 From: Marijn Haverbeke Date: Mon, 10 Oct 2011 13:54:03 +0200 Subject: 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 --- src/lib/str.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/lib') diff --git a/src/lib/str.rs b/src/lib/str.rs index 9efb24b6e51..a3c8a548692 100644 --- a/src/lib/str.rs +++ b/src/lib/str.rs @@ -11,11 +11,11 @@ native "rust" mod rustrt { fn rust_str_push(&s: str, ch: u8); } -fn eq(a: str, b: str) -> bool { a == b } +fn eq(&&a: str, &&b: str) -> bool { a == b } -fn lteq(a: str, b: str) -> bool { a <= b } +fn lteq(&&a: str, &&b: str) -> bool { a <= b } -fn hash(s: str) -> uint { +fn hash(&&s: str) -> uint { // djb hash. // FIXME: replace with murmur. -- cgit 1.4.1-3-g733a5