Skip to content

Commit 19e9b64

Browse files
committed
---
yaml --- r: 152383 b: refs/heads/try2 c: 45e56ec h: refs/heads/master i: 152381: c4e58c1 152379: 3d9114d 152375: a867e19 152367: f449d75 152351: a72aeca 152319: 3ded02a v: v3
1 parent 190f6a2 commit 19e9b64

File tree

14 files changed

+43
-66
lines changed

14 files changed

+43
-66
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: 8dcbdaaeb79c69cc3ba6efb68650c89ca47969e4
8+
refs/heads/try2: 45e56eccbed3161dd9de547c6c2dcf618114a484
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/src/libcollections/bitv.rs

Lines changed: 25 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ use core::iter::{Enumerate, Repeat, Map, Zip};
1818
use core::ops;
1919
use core::slice;
2020
use core::uint;
21-
use std::hash;
2221

2322
use vec::Vec;
2423

@@ -35,12 +34,12 @@ fn small_mask(nbits: uint) -> uint {
3534
}
3635

3736
impl SmallBitv {
38-
fn new(bits: uint) -> SmallBitv {
37+
pub fn new(bits: uint) -> SmallBitv {
3938
SmallBitv {bits: bits}
4039
}
4140

4241
#[inline]
43-
fn bits_op(&mut self,
42+
pub fn bits_op(&mut self,
4443
right_bits: uint,
4544
nbits: uint,
4645
f: |uint, uint| -> uint)
@@ -53,32 +52,32 @@ impl SmallBitv {
5352
}
5453

5554
#[inline]
56-
fn union(&mut self, s: &SmallBitv, nbits: uint) -> bool {
55+
pub fn union(&mut self, s: &SmallBitv, nbits: uint) -> bool {
5756
self.bits_op(s.bits, nbits, |u1, u2| u1 | u2)
5857
}
5958

6059
#[inline]
61-
fn intersect(&mut self, s: &SmallBitv, nbits: uint) -> bool {
60+
pub fn intersect(&mut self, s: &SmallBitv, nbits: uint) -> bool {
6261
self.bits_op(s.bits, nbits, |u1, u2| u1 & u2)
6362
}
6463

6564
#[inline]
66-
fn become(&mut self, s: &SmallBitv, nbits: uint) -> bool {
65+
pub fn become(&mut self, s: &SmallBitv, nbits: uint) -> bool {
6766
self.bits_op(s.bits, nbits, |_u1, u2| u2)
6867
}
6968

7069
#[inline]
71-
fn difference(&mut self, s: &SmallBitv, nbits: uint) -> bool {
70+
pub fn difference(&mut self, s: &SmallBitv, nbits: uint) -> bool {
7271
self.bits_op(s.bits, nbits, |u1, u2| u1 & !u2)
7372
}
7473

7574
#[inline]
76-
fn get(&self, i: uint) -> bool {
75+
pub fn get(&self, i: uint) -> bool {
7776
(self.bits & (1 << i)) != 0
7877
}
7978

8079
#[inline]
81-
fn set(&mut self, i: uint, x: bool) {
80+
pub fn set(&mut self, i: uint, x: bool) {
8281
if x {
8382
self.bits |= 1<<i;
8483
}
@@ -88,29 +87,29 @@ impl SmallBitv {
8887
}
8988

9089
#[inline]
91-
fn equals(&self, b: &SmallBitv, nbits: uint) -> bool {
90+
pub fn equals(&self, b: &SmallBitv, nbits: uint) -> bool {
9291
let mask = small_mask(nbits);
9392
mask & self.bits == mask & b.bits
9493
}
9594

9695
#[inline]
97-
fn clear(&mut self) { self.bits = 0; }
96+
pub fn clear(&mut self) { self.bits = 0; }
9897

9998
#[inline]
100-
fn set_all(&mut self) { self.bits = !0; }
99+
pub fn set_all(&mut self) { self.bits = !0; }
101100

102101
#[inline]
103-
fn all(&self, nbits: uint) -> bool {
102+
pub fn all(&self, nbits: uint) -> bool {
104103
small_mask(nbits) & !self.bits == 0
105104
}
106105

107106
#[inline]
108-
fn none(&self, nbits: uint) -> bool {
107+
pub fn none(&self, nbits: uint) -> bool {
109108
small_mask(nbits) & self.bits == 0
110109
}
111110

112111
#[inline]
113-
fn negate(&mut self) { self.bits = !self.bits; }
112+
pub fn negate(&mut self) { self.bits = !self.bits; }
114113
}
115114

116115
#[deriving(Clone)]
@@ -135,12 +134,12 @@ fn big_mask(nbits: uint, elem: uint) -> uint {
135134
}
136135

137136
impl BigBitv {
138-
fn new(storage: Vec<uint>) -> BigBitv {
137+
pub fn new(storage: Vec<uint>) -> BigBitv {
139138
BigBitv {storage: storage}
140139
}
141140

142141
#[inline]
143-
fn process(&mut self,
142+
pub fn process(&mut self,
144143
b: &BigBitv,
145144
nbits: uint,
146145
op: |uint, uint| -> uint)
@@ -164,45 +163,45 @@ impl BigBitv {
164163
}
165164

166165
#[inline]
167-
fn each_storage(&mut self, op: |v: &mut uint| -> bool) -> bool {
166+
pub fn each_storage(&mut self, op: |v: &mut uint| -> bool) -> bool {
168167
self.storage.mut_iter().advance(|elt| op(elt))
169168
}
170169

171170
#[inline]
172-
fn negate(&mut self) {
171+
pub fn negate(&mut self) {
173172
self.each_storage(|w| { *w = !*w; true });
174173
}
175174

176175
#[inline]
177-
fn union(&mut self, b: &BigBitv, nbits: uint) -> bool {
176+
pub fn union(&mut self, b: &BigBitv, nbits: uint) -> bool {
178177
self.process(b, nbits, |w1, w2| w1 | w2)
179178
}
180179

181180
#[inline]
182-
fn intersect(&mut self, b: &BigBitv, nbits: uint) -> bool {
181+
pub fn intersect(&mut self, b: &BigBitv, nbits: uint) -> bool {
183182
self.process(b, nbits, |w1, w2| w1 & w2)
184183
}
185184

186185
#[inline]
187-
fn become(&mut self, b: &BigBitv, nbits: uint) -> bool {
186+
pub fn become(&mut self, b: &BigBitv, nbits: uint) -> bool {
188187
self.process(b, nbits, |_, w| w)
189188
}
190189

191190
#[inline]
192-
fn difference(&mut self, b: &BigBitv, nbits: uint) -> bool {
191+
pub fn difference(&mut self, b: &BigBitv, nbits: uint) -> bool {
193192
self.process(b, nbits, |w1, w2| w1 & !w2)
194193
}
195194

196195
#[inline]
197-
fn get(&self, i: uint) -> bool {
196+
pub fn get(&self, i: uint) -> bool {
198197
let w = i / uint::BITS;
199198
let b = i % uint::BITS;
200199
let x = 1 & self.storage.get(w) >> b;
201200
x == 1
202201
}
203202

204203
#[inline]
205-
fn set(&mut self, i: uint, x: bool) {
204+
pub fn set(&mut self, i: uint, x: bool) {
206205
let w = i / uint::BITS;
207206
let b = i % uint::BITS;
208207
let flag = 1 << b;
@@ -211,7 +210,7 @@ impl BigBitv {
211210
}
212211

213212
#[inline]
214-
fn equals(&self, b: &BigBitv, nbits: uint) -> bool {
213+
pub fn equals(&self, b: &BigBitv, nbits: uint) -> bool {
215214
for (i, elt) in b.storage.iter().enumerate() {
216215
let mask = big_mask(nbits, i);
217216
if mask & *self.storage.get(i) != mask & *elt {
@@ -597,20 +596,6 @@ impl fmt::Show for Bitv {
597596
}
598597
}
599598

600-
impl<S: hash::Writer> hash::Hash<S> for Bitv {
601-
fn hash(&self, state: &mut S) {
602-
self.nbits.hash(state);
603-
match self.rep {
604-
Small(ref s) => (s.bits & small_mask(self.nbits)).hash(state),
605-
Big(ref b) => {
606-
for (i, ele) in b.storage.iter().enumerate() {
607-
(ele & big_mask(self.nbits, i)).hash(state);
608-
}
609-
}
610-
}
611-
}
612-
}
613-
614599
#[inline]
615600
fn iterate_bits(base: uint, bits: uint, f: |uint| -> bool) -> bool {
616601
if bits == 0 {
@@ -849,14 +834,6 @@ impl fmt::Show for BitvSet {
849834
}
850835
}
851836

852-
impl<S: hash::Writer> hash::Hash<S> for BitvSet {
853-
fn hash(&self, state: &mut S) {
854-
for pos in self.iter() {
855-
pos.hash(state);
856-
}
857-
}
858-
}
859-
860837
impl Container for BitvSet {
861838
#[inline]
862839
fn len(&self) -> uint { self.size }

branches/try2/src/libcollections/vec.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1532,7 +1532,7 @@ impl<T> FromVec<T> for ~[T] {
15321532

15331533
// In a post-DST world, we can attempt to reuse the Vec allocation by calling
15341534
// shrink_to_fit() on it. That may involve a reallocation+memcpy, but that's no
1535-
// diffrent than what we're doing manually here.
1535+
// different than what we're doing manually here.
15361536

15371537
let vp = v.as_mut_ptr();
15381538

branches/try2/src/libcore/simd.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
//!
3232
//! ## Stability Note
3333
//!
34-
//! These are all experimental. The inferface may change entirely, without
34+
//! These are all experimental. The interface may change entirely, without
3535
//! warning.
3636
3737
#![allow(non_camel_case_types)]

branches/try2/src/libcore/str.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -478,7 +478,7 @@ impl TwoWaySearcher {
478478
}
479479

480480
/// The internal state of an iterator that searches for matches of a substring
481-
/// within a larger string using a dynamically chosed search algorithm
481+
/// within a larger string using a dynamically chosen search algorithm
482482
#[deriving(Clone)]
483483
enum Searcher {
484484
Naive(NaiveSearcher),
@@ -1120,7 +1120,7 @@ pub trait StrSlice<'a> {
11201120
///
11211121
/// That is, each returned value `(start, end)` satisfies
11221122
/// `self.slice(start, end) == sep`. For matches of `sep` within
1123-
/// `self` that overlap, only the indicies corresponding to the
1123+
/// `self` that overlap, only the indices corresponding to the
11241124
/// first match are returned.
11251125
///
11261126
/// # Example

branches/try2/src/libserialize/json.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -992,7 +992,7 @@ enum ParserState {
992992
ParseObject(bool),
993993
// Parse ',' or ']' after an element in an object.
994994
ParseObjectComma,
995-
// Initialial state.
995+
// Initial state.
996996
ParseStart,
997997
// Expecting the stream to end.
998998
ParseBeforeFinish,
@@ -1152,7 +1152,7 @@ pub struct Parser<T> {
11521152
// We maintain a stack representing where we are in the logical structure
11531153
// of the JSON stream.
11541154
stack: Stack,
1155-
// A state machine is kept to make it possible to interupt and resume parsing.
1155+
// A state machine is kept to make it possible to interrupt and resume parsing.
11561156
state: ParserState,
11571157
}
11581158

@@ -1449,7 +1449,7 @@ impl<T: Iterator<char>> Parser<T> {
14491449
// information to return a JsonEvent.
14501450
// Manages an internal state so that parsing can be interrupted and resumed.
14511451
// Also keeps track of the position in the logical structure of the json
1452-
// stream int the form of a stack that can be queried by the user usng the
1452+
// stream int the form of a stack that can be queried by the user using the
14531453
// stack() method.
14541454
fn parse(&mut self) -> JsonEvent {
14551455
loop {

branches/try2/src/libstd/io/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -910,7 +910,7 @@ impl<'a> Reader for &'a mut Reader {
910910

911911
/// Returns a slice of `v` between `start` and `end`.
912912
///
913-
/// Similar to `slice()` except this function only bounds the sclie on the
913+
/// Similar to `slice()` except this function only bounds the slice on the
914914
/// capacity of `v`, not the length.
915915
///
916916
/// # Failure

branches/try2/src/libstd/io/process.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -873,7 +873,7 @@ mod tests {
873873
pub fn sleeper() -> Process {
874874
// There's a `timeout` command on windows, but it doesn't like having
875875
// its output piped, so instead just ping ourselves a few times with
876-
// gaps inbetweeen so we're sure this process is alive for awhile
876+
// gaps in between so we're sure this process is alive for awhile
877877
Command::new("ping").arg("127.0.0.1").arg("-n").arg("1000").spawn().unwrap()
878878
}
879879

branches/try2/src/libstd/io/stdio.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ local_data_key!(local_stdout: Box<Writer:Send>)
102102
pub fn stdin() -> BufferedReader<StdReader> {
103103
// The default buffer capacity is 64k, but apparently windows doesn't like
104104
// 64k reads on stdin. See #13304 for details, but the idea is that on
105-
// windows we use a slighly smaller buffer that's been seen to be
105+
// windows we use a slightly smaller buffer that's been seen to be
106106
// acceptable.
107107
if cfg!(windows) {
108108
BufferedReader::with_capacity(8 * 1024, stdin_raw())

branches/try2/src/libstd/io/timer.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ mod test {
218218
iotest!(fn test_io_timer_oneshot_then_sleep() {
219219
let mut timer = Timer::new().unwrap();
220220
let rx = timer.oneshot(100000000000);
221-
timer.sleep(1); // this should inalidate rx
221+
timer.sleep(1); // this should invalidate rx
222222

223223
assert_eq!(rx.recv_opt(), Err(()));
224224
})
@@ -352,7 +352,7 @@ mod test {
352352
let mut timer1 = Timer::new().unwrap();
353353
timer1.oneshot(1);
354354
let mut timer2 = Timer::new().unwrap();
355-
// while sleeping, the prevous timer should fire and not have its
355+
// while sleeping, the previous timer should fire and not have its
356356
// callback do something terrible.
357357
timer2.sleep(2);
358358
})
@@ -361,7 +361,7 @@ mod test {
361361
let mut timer1 = Timer::new().unwrap();
362362
timer1.periodic(1);
363363
let mut timer2 = Timer::new().unwrap();
364-
// while sleeping, the prevous timer should fire and not have its
364+
// while sleeping, the previous timer should fire and not have its
365365
// callback do something terrible.
366366
timer2.sleep(2);
367367
})

branches/try2/src/libstd/num/strconv.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -636,7 +636,7 @@ pub fn from_str_bytes_common<T:NumCast+Zero+One+PartialEq+PartialOrd+Div<T,T>+
636636
if accum_positive && accum <= last_accum { return NumStrConv::inf(); }
637637
if !accum_positive && accum >= last_accum { return NumStrConv::neg_inf(); }
638638

639-
// Detect overflow by reversing the shift-and-add proccess
639+
// Detect overflow by reversing the shift-and-add process
640640
if accum_positive &&
641641
(last_accum != ((accum - cast(digit as int).unwrap())/radix_gen.clone())) {
642642
return NumStrConv::inf();

branches/try2/src/libstd/os.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ pub fn env_as_bytes() -> Vec<(Vec<u8>,Vec<u8>)> {
320320
/// let key = "HOME";
321321
/// match std::os::getenv(key) {
322322
/// Some(val) => println!("{}: {}", key, val),
323-
/// None => println!("{} is not defined in the environnement.", key)
323+
/// None => println!("{} is not defined in the environment.", key)
324324
/// }
325325
/// ```
326326
pub fn getenv(n: &str) -> Option<String> {

branches/try2/src/libstd/path/windows.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ impl GenericPathUnsafe for Path {
186186
ret
187187
}
188188

189-
/// See `GenericPathUnsafe::set_filename_unchecekd`.
189+
/// See `GenericPathUnsafe::set_filename_unchecked`.
190190
///
191191
/// # Failure
192192
///

branches/try2/src/libstd/rt/thread.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ mod imp {
243243
// EINVAL means |stack_size| is either too small or not a
244244
// multiple of the system page size. Because it's definitely
245245
// >= PTHREAD_STACK_MIN, it must be an alignment issue.
246-
// Round up to the neareast page and try again.
246+
// Round up to the nearest page and try again.
247247
let page_size = os::page_size();
248248
let stack_size = (stack_size + page_size - 1) & (-(page_size - 1) - 1);
249249
assert_eq!(pthread_attr_setstacksize(&mut attr, stack_size as libc::size_t), 0);

0 commit comments

Comments
 (0)