| Age | Commit message (Collapse) | Author | Lines |
|
|
|
The following are renamed:
* `min_value` => `MIN`
* `max_value` => `MAX`
* `bits` => `BITS`
* `bytes` => `BYTES`
Fixes #10010.
|
|
Consensus leaned in favour of using rev instead of flip.
|
|
Renamed the invert() function in iter.rs to flip().
Also renamed the Invert<T> type to Flip<T>.
Some related code comments changed. Documentation that I could find has
been updated, and all the instances I could locate where the
function/type were called have been updated as well.
|
|
This is my first patch so feedback appreciated!
Bug when initialising `bitv:Bitv::new(int,bool)` when `bool=true`. It created a `Bitv` with underlying representation `!0u` rather than the actual desired bit layout ( e.g. `11111111` instead of `00001111`). This works OK because a size attribute is included which keeps access to legal bounds. However when using `BitvSet::from_bitv(Bitv)`, we then find that `bitvset.contains(i)` can return true when `i` should not in fact be in the set.
```
let bs = BitvSet::from_bitv(Bitv::new(100, true));
assert!(!bs.contains(&127)) //fails
```
The fix is to create the correct representation by treating various cases separately and using a bitshift `(1<<nbits) - 1` to generate correct number of `1`s where necessary.
|
|
Rename existing iterators to get rid of the Iterator suffix and to
give them names that better describe the things being iterated over.
|
|
|
|
Conflicts:
src/librustc/middle/lint.rs
|
|
This code in resolve accidentally forced all types with an impl to become
public. This fixes it by default inheriting the privacy of what was previously
there and then becoming `true` if nothing else exits.
Closes #10545
|
|
Also remove all instances of 'self within the codebase.
This fixes #10889.
|
|
|
|
|
|
|
|
`librustuv`.
|
|
|
|
|
|
|
|
|
|
Who doesn't like a massive renaming?
|
|
This provides 2 methods: .reseed() and ::from_seed that modify and
create respecitively.
Implement this trait for the RNGs in the stdlib for which this makes
sense.
|
|
This is 2x faster on 64-bit computers at generating anything larger
than 32-bits.
It has been verified against the canonical C implementation from the
website of the creator of ISAAC64.
Also, move `Rng.next` to `Rng.next_u32` and add `Rng.next_u64` to
take full advantage of the wider word width; otherwise Isaac64 will
always be squeezed down into a u32 wasting half the entropy and
offering no advantage over the 32-bit variant.
|
|
|
|
Collation of @kud1ing's work in #9511, #9512, #9513 and #9518.
|
|
|
|
|
|
The trait will keep the `Iterator` naming, but a more concise module
name makes using the free functions less verbose. The module will define
iterables in addition to iterators, as it deals with iteration in
general.
|
|
|
|
|
|
cc #5898
|
|
Fix inappropriate for-range loops to use for-iterator constructs (or
other appropriate solution) instead.
|
|
|
|
|
|
this has been replaced by `for`
|
|
Signed-off-by: OGINO Masanori <masanori.ogino@gmail.com>
|
|
|
|
|
|
Change the former repetition::
for 5.times { }
to::
do 5.times { }
.times() cannot be broken with `break` or `return` anymore; for those
cases, use a numerical range loop instead.
|
|
.intersection(), .union() etc methods in trait std::container::Set use
internal iters. Remove these methods from the trait.
I reported issue #8154 for the reinstatement of iterator-based set algebra
methods to the Set trait.
For bitv and treemap, that lack Iterator implementations of set
operations, preserve them as methods directly on the types themselves.
For HashSet, these methods are replaced by the present .union_iter()
etc.
|
|
Convert some internally used functions to use a external iterators.
Change all uses of remaining internal iterators to use `do` expr
|
|
|
|
|
|
|
|
|
|
A couple of implementations of Container::is_empty weren't exactly
self.len() == 0 so I left them alone (e.g. Treemap).
|
|
|
|
|
|
BitvVariant is the same size as it was before (16 bytes).
|
|
|
|
|
|
Most of these are "unneccesary allocation" in bitv, for ~[false, ..] instead
of [false, ..].
|