Skip to content

Rollup a bunch of smaller PRs #7417

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
wants to merge 22 commits into from
Closed

Rollup a bunch of smaller PRs #7417

wants to merge 22 commits into from

Conversation

emberian
Copy link
Member

No description provided.

artagnon and others added 22 commits June 26, 2013 17:59
So --remote can work.

Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Move all the colors into a nested mod named color instead of prefixing
with "color_".

Define a new type color::Color, and make this a u16 instead of a u8 (to
allow for easy comparisons against num_colors, which is a u16).

Remove color_supported and replace it with num_colors.

Teach fg() and bg() to "dim" bright colors down to the normal intensity
if num_colors isn't high enough.

Remove unnecessary copies, and fix a bug where a terminfo parse failure
would try to use the wrong error and end up failing.
Remove PriorityQueue::each and replace it with PriorityQueue::iter,
which ultimately calls into vec::VecIterator via PriorityQueueIterator.
Implement iterator::Iterator for PriorityQueueIterator.  Now you should
be able to do:

  extern mod extra;
  let mut pq = extra::priority_queue::PriorityQueue::new();
  pq.push(5);
  pq.push(6);
  pq.push(3);
  for pq.iter().advance |el| {
      println(fmt!("%d", *el));
  }

just like you iterate over vectors, hashmaps, hashsets etc.  Note that
the iteration order is arbitrary (as before with PriorityQueue::each),
and _not_ the order you get when you pop() repeatedly.

Add an in-file test to guard this.

Reported-by: Daniel Micay <danielmicay@gmail.com>
Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Add new trait vec::bytes::MutableByteVector which currently defines one
method .set_memory().
Add method .move_from() to MutableVector, which consumes another vector
and moves elements into the receiver.

Add new trait MutableCloneableVector with one method .copy_from(), which
clones elements from another vector into the receiver.
Both extra::treemap::TreeMap and extra::treemap::TreeSet have
corresponding iterators TreeMapIterator and TreeSetIterator.
Unfortunately, the tests and extra::serialize use the older .each.
Update all the dependent code, and remove .each.

Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
`reverse(xs.mut_slice(a, b))` replaces `reverse_part(xs, a, b)`
@thestinger thestinger closed this Jun 27, 2013
@thestinger
Copy link
Contributor

#7420

@Centril Centril added the rollup A PR which is a rollup label Oct 2, 2019
flip1995 pushed a commit to flip1995/rust that referenced this pull request Jul 29, 2021
Enhance needless continue to detect loop {continue;}

Fixes rust-lang#7417

changelog: Report [`needless_continue`] in `loop { continue; }` case
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
rollup A PR which is a rollup
Projects
None yet
Development

Successfully merging this pull request may close these issues.