diff options
| author | Marijn Haverbeke <marijnh@gmail.com> | 2011-10-10 13:54:03 +0200 |
|---|---|---|
| committer | Marijn Haverbeke <marijnh@gmail.com> | 2011-10-10 16:01:51 +0200 |
| commit | 33167f7decfdc70c9dca6c41f80883f12c13cfbc (patch) | |
| tree | 6a7b610fe6af5bd7e1ff81c54e63a580505f32d2 /src/lib | |
| parent | b4bae8fea5943a0b95a1a9be13a8155ee45418b7 (diff) | |
| download | rust-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/lib')
| -rw-r--r-- | src/lib/str.rs | 6 |
1 files changed, 3 insertions, 3 deletions
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. |
