Skip to content

Commit 030dd7f

Browse files
committed
---
yaml --- r: 42835 b: refs/heads/try c: dafd759 h: refs/heads/master i: 42833: 42a5d31 42831: cf5a455 v: v3
1 parent 263068b commit 030dd7f

File tree

6 files changed

+10
-11
lines changed

6 files changed

+10
-11
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: 19dfec2aaf746535de1521f68421f9980dbf25de
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 2f46b763da2c098913884f101b6d71d69af41b49
5-
refs/heads/try: 5e55fe875855a39ed87584d155d26c8c54d3adff
5+
refs/heads/try: dafd759b2063d89f03ab72f931f1da2f03a927fb
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: a810c03263670238bccd64cabb12a23a46e3a278

branches/try/src/libstd/bitv.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ pub fn Bitv (nbits: uint, init: bool) -> Bitv {
233233
let nelems = nbits/uint_bits +
234234
if nbits % uint_bits == 0 {0} else {1};
235235
let elem = if init {!0} else {0};
236-
let s = cast_to_mut(from_elem(nelems, elem));
236+
let s = from_elem(nelems, elem);
237237
Big(~BigBitv(move s))
238238
};
239239
Bitv {rep: move rep, nbits: nbits}
@@ -518,7 +518,7 @@ impl Bitv: Clone {
518518
Bitv{nbits: self.nbits, rep: Small(~SmallBitv{bits: b.bits})}
519519
}
520520
Big(ref b) => {
521-
let st = cast_to_mut(from_elem(self.nbits / uint_bits + 1, 0));
521+
let mut st = from_elem(self.nbits / uint_bits + 1, 0);
522522
let len = st.len();
523523
for uint::range(0, len) |i| { st[i] = b.storage[i]; };
524524
Bitv{nbits: self.nbits, rep: Big(~BigBitv{storage: move st})}

branches/try/src/libstd/map.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ pub mod chained {
209209
fn rehash() {
210210
let n_old_chains = self.chains.len();
211211
let n_new_chains: uint = uint::next_power_of_two(n_old_chains+1u);
212-
let new_chains = chains(n_new_chains);
212+
let mut new_chains = chains(n_new_chains);
213213
for self.each_entry |entry| {
214214
let idx = entry.hash % n_new_chains;
215215
entry.next = new_chains[idx];
@@ -459,7 +459,7 @@ pub mod chained {
459459
}
460460

461461
fn chains<K,V>(nchains: uint) -> ~[Option<@Entry<K,V>>] {
462-
vec::cast_to_mut(vec::from_elem(nchains, None))
462+
vec::from_elem(nchains, None)
463463
}
464464

465465
pub fn mk<K:Eq IterBytes Hash, V: Copy>() -> T<K,V> {

branches/try/src/libstd/rope.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1168,8 +1168,7 @@ pub mod node {
11681168
}
11691169

11701170
pub fn start(node: @Node) -> T {
1171-
let stack = vec::cast_to_mut(
1172-
vec::from_elem(height(node)+1u, node));
1171+
let stack = vec::from_elem(height(node)+1u, node);
11731172
T {
11741173
stack: stack,
11751174
stackpos: 0,

branches/try/src/libstd/sha1.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,13 +67,13 @@ const k3: u32 = 0xCA62C1D6u32;
6767
/// Construct a `sha` object
6868
pub fn sha1() -> Sha1 {
6969
type Sha1State =
70-
{h: ~[u32],
70+
{h: ~[mut u32],
7171
mut len_low: u32,
7272
mut len_high: u32,
73-
mut msg_block: ~[u8],
73+
msg_block: ~[mut u8],
7474
mut msg_block_idx: uint,
7575
mut computed: bool,
76-
work_buf: @~[u32]};
76+
work_buf: @~[mut u32]};
7777

7878
fn add_input(st: &Sha1State, msg: &[const u8]) {
7979
assert (!st.computed);

branches/try/src/libstd/sync.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ fn new_sem_and_signal(count: int, num_condvars: uint)
9797
for num_condvars.times {
9898
queues.push(new_waitqueue());
9999
}
100-
new_sem(count, vec::cast_to_mut(move queues))
100+
new_sem(count, queues)
101101
}
102102

103103
#[doc(hidden)]

0 commit comments

Comments
 (0)