diff options
| author | Ben Striegel <ben.striegel@gmail.com> | 2013-01-29 22:19:41 -0500 |
|---|---|---|
| committer | Ben Striegel <ben.striegel@gmail.com> | 2013-01-30 23:19:08 -0500 |
| commit | 0336a8633f0734ef269c000c5d7432b7a706a1fe (patch) | |
| tree | c0a7fdaaa53b2015d20db78a9cae57cef8024d75 /src/libstd | |
| parent | 3e95a1357756db52ff7e6b6376f8c6ed59925971 (diff) | |
RIMOV, round 10
find ./ -type f -name "*.rs" -exec sed -i "s/~\[mut /~\[/g" {} \;
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/bitv.rs | 2 | ||||
| -rw-r--r-- | src/libstd/map.rs | 2 | ||||
| -rw-r--r-- | src/libstd/sha1.rs | 4 | ||||
| -rw-r--r-- | src/libstd/sort.rs | 2 | ||||
| -rw-r--r-- | src/libstd/sync.rs | 20 |
5 files changed, 15 insertions, 15 deletions
diff --git a/src/libstd/bitv.rs b/src/libstd/bitv.rs index 10c6ac64f65..834b5add6eb 100644 --- a/src/libstd/bitv.rs +++ b/src/libstd/bitv.rs @@ -109,7 +109,7 @@ struct BigBitv { mut storage: ~[uint] } -fn BigBitv(storage: ~[mut uint]) -> BigBitv { +fn BigBitv(storage: ~[uint]) -> BigBitv { BigBitv {storage: move storage} } diff --git a/src/libstd/map.rs b/src/libstd/map.rs index 7545a6e0bef..62bce2c2894 100644 --- a/src/libstd/map.rs +++ b/src/libstd/map.rs @@ -458,7 +458,7 @@ pub mod chained { } } - fn chains<K,V>(nchains: uint) -> ~[mut Option<@Entry<K,V>>] { + fn chains<K,V>(nchains: uint) -> ~[Option<@Entry<K,V>>] { vec::cast_to_mut(vec::from_elem(nchains, None)) } diff --git a/src/libstd/sha1.rs b/src/libstd/sha1.rs index 4a7e67f22b9..20359782d96 100644 --- a/src/libstd/sha1.rs +++ b/src/libstd/sha1.rs @@ -67,13 +67,13 @@ const k3: u32 = 0xCA62C1D6u32; /// Construct a `sha` object pub fn sha1() -> Sha1 { type Sha1State = - {h: ~[mut u32], + {h: ~[u32], mut len_low: u32, mut len_high: u32, mut msg_block: ~[u8], mut msg_block_idx: uint, mut computed: bool, - work_buf: @~[mut u32]}; + work_buf: @~[u32]}; fn add_input(st: &Sha1State, msg: &[const u8]) { assert (!st.computed); diff --git a/src/libstd/sort.rs b/src/libstd/sort.rs index c8e6fedbc5d..5e39b8b6801 100644 --- a/src/libstd/sort.rs +++ b/src/libstd/sort.rs @@ -1019,7 +1019,7 @@ mod big_tests { tabulate_managed(low, high); } - fn multiplyVec<T: Copy>(arr: &[const T], num: uint) -> ~[mut T] { + fn multiplyVec<T: Copy>(arr: &[const T], num: uint) -> ~[T] { let size = arr.len(); let res = do vec::from_fn(num) |i| { arr[i % size] diff --git a/src/libstd/sync.rs b/src/libstd/sync.rs index bd9386845ae..dabc5b383a4 100644 --- a/src/libstd/sync.rs +++ b/src/libstd/sync.rs @@ -92,7 +92,7 @@ fn new_sem<Q: Owned>(count: int, q: Q) -> Sem<Q> { } #[doc(hidden)] fn new_sem_and_signal(count: int, num_condvars: uint) - -> Sem<~[mut Waitqueue]> { + -> Sem<~[Waitqueue]> { let mut queues = ~[]; for num_condvars.times { queues.push(new_waitqueue()); @@ -150,7 +150,7 @@ impl &Sem<()> { } } #[doc(hidden)] -impl &Sem<~[mut Waitqueue]> { +impl &Sem<~[Waitqueue]> { fn access<U>(blk: fn() -> U) -> U { let mut release = None; unsafe { @@ -166,7 +166,7 @@ impl &Sem<~[mut Waitqueue]> { // FIXME(#3588) should go inside of access() #[doc(hidden)] type SemRelease = SemReleaseGeneric<()>; -type SemAndSignalRelease = SemReleaseGeneric<~[mut Waitqueue]>; +type SemAndSignalRelease = SemReleaseGeneric<~[Waitqueue]>; struct SemReleaseGeneric<Q> { sem: &Sem<Q> } impl<Q: Owned> SemReleaseGeneric<Q> : Drop { @@ -181,7 +181,7 @@ fn SemRelease(sem: &r/Sem<()>) -> SemRelease/&r { } } -fn SemAndSignalRelease(sem: &r/Sem<~[mut Waitqueue]>) +fn SemAndSignalRelease(sem: &r/Sem<~[Waitqueue]>) -> SemAndSignalRelease/&r { SemReleaseGeneric { sem: sem @@ -189,7 +189,7 @@ fn SemAndSignalRelease(sem: &r/Sem<~[mut Waitqueue]>) } /// A mechanism for atomic-unlock-and-deschedule blocking and signalling. -pub struct Condvar { priv sem: &Sem<~[mut Waitqueue]> } +pub struct Condvar { priv sem: &Sem<~[Waitqueue]> } impl Condvar : Drop { fn finalize(&self) {} } @@ -259,7 +259,7 @@ impl &Condvar { // mutex during unwinding. As long as the wrapper (mutex, etc) is // bounded in when it gets released, this shouldn't hang forever. struct SemAndSignalReacquire { - sem: &Sem<~[mut Waitqueue]>, + sem: &Sem<~[Waitqueue]>, } impl SemAndSignalReacquire : Drop { @@ -273,7 +273,7 @@ impl &Condvar { } } - fn SemAndSignalReacquire(sem: &r/Sem<~[mut Waitqueue]>) + fn SemAndSignalReacquire(sem: &r/Sem<~[Waitqueue]>) -> SemAndSignalReacquire/&r { SemAndSignalReacquire { sem: sem @@ -345,7 +345,7 @@ fn check_cvar_bounds<U>(out_of_bounds: Option<uint>, id: uint, act: &str, } #[doc(hidden)] -impl &Sem<~[mut Waitqueue]> { +impl &Sem<~[Waitqueue]> { // The only other place that condvars get built is rwlock_write_mode. fn access_cond<U>(blk: fn(c: &Condvar) -> U) -> U { do self.access { blk(&Condvar { sem: self }) } @@ -400,7 +400,7 @@ impl &Semaphore { * A task which fails while holding a mutex will unlock the mutex as it * unwinds. */ -struct Mutex { priv sem: Sem<~[mut Waitqueue]> } +struct Mutex { priv sem: Sem<~[Waitqueue]> } /// Create a new mutex, with one associated condvar. pub fn Mutex() -> Mutex { mutex_with_condvars(1) } @@ -450,7 +450,7 @@ struct RWlockInner { */ struct RWlock { priv order_lock: Semaphore, - priv access_lock: Sem<~[mut Waitqueue]>, + priv access_lock: Sem<~[Waitqueue]>, priv state: Exclusive<RWlockInner> } |
