Skip to content

Rolling up PRs in the queue #13443

New issue

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

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

Already on GitHub? Sign in to your account

Closed
wants to merge 29 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
d3c831b
std: use a `match` in `assert_eq!` to extend the lifetime of the args.
huonw Apr 7, 2014
4b9a7a2
collections: replace all ~[T] with Vec<T>.
huonw Apr 5, 2014
5bcb761
auto merge of #13350 : huonw/rust/devec-collections, r=alexcrichton
bors Apr 10, 2014
43e8ace
debuginfo: Improve source code position assignment for inlined functi…
michaelwoerister Mar 27, 2014
c26d254
debuginfo: Implement discriminator type metadata re-use.
michaelwoerister Mar 27, 2014
5099b8c
debuginfo: Don't create debuginfo for statics inlined from other crates.
michaelwoerister Apr 10, 2014
8135032
Remove references to @Trait from a compiler error message
lilyball Apr 9, 2014
342e8b5
Fix outdated lint warning about inner attribute
milibopp Apr 9, 2014
a65411e
std,serialize: remove some internal uses of ~[].
huonw Apr 9, 2014
3015949
std,native,green,rustuv: make readdir return `Vec`.
huonw Apr 9, 2014
1403b35
std,syntax: make std::fmt::parse use `Vec`s.
huonw Apr 9, 2014
8ec16e1
green: de-~[].
huonw Apr 9, 2014
32cf4a1
native: remove some internal ~[].
huonw Apr 9, 2014
6e63b12
Remove some internal ~[] from several libraries.
huonw Apr 9, 2014
b994828
Stop using transmute_mut in RefCell
sfackler Apr 9, 2014
a70f8d9
Remove an unnecessary file.
omasanori Apr 9, 2014
da25539
Generalized the pretty-print entry points to support `-o <file>`.
pnkfelix Apr 8, 2014
6d6d4c9
test: Add a test for #7663
alexcrichton Apr 8, 2014
dd00bf3
mk: Add a dummy CFG_COMPILER_HOST_TRIPLE to rustdoc invocation.
lifthrasiir Apr 8, 2014
34ece7a
rustdoc: Clean the `initSearch` routine up.
lifthrasiir Apr 8, 2014
85299e3
rustdoc: Prune the paths that do not appear in the index.
lifthrasiir Apr 8, 2014
ec99673
rustc: Remove absolute rpaths
alexcrichton Apr 7, 2014
f9e17e1
rustc: Don't rpath to librustrt.dylib
alexcrichton Apr 8, 2014
25a6b6e
rustc: Add a realpath utility function
alexcrichton Apr 8, 2014
3f2c55f
rustc: Use realpath() for sysroot/rpath
alexcrichton Apr 8, 2014
0bf4e90
Renamed ast::Purity to ast::FnStyle and ast::ImpureFn to ast::NormalF…
kaseyc Apr 7, 2014
83d2c0b
rustc: Disallow importing through use statements
alexcrichton Apr 8, 2014
df533c6
rustc: Don't succeed on shadowed nonexistent import
alexcrichton Apr 8, 2014
1f2c18a
rustc: Don't allow priv use to shadow pub use
alexcrichton Apr 8, 2014
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
native: remove some internal ~[].
  • Loading branch information
huonw authored and alexcrichton committed Apr 10, 2014
commit 32cf4a188c220d1d36a153af19ede1eb43cace05
12 changes: 6 additions & 6 deletions src/libnative/io/timer_other.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,19 +102,19 @@ fn helper(input: libc::c_int, messages: Receiver<Req>) {
// active timers are those which are able to be selected upon (and it's a
// sorted list, and dead timers are those which have expired, but ownership
// hasn't yet been transferred back to the timer itself.
let mut active: ~[~Inner] = ~[];
let mut dead = ~[];
let mut active: Vec<~Inner> = vec![];
let mut dead = vec![];

// inserts a timer into an array of timers (sorted by firing time)
fn insert(t: ~Inner, active: &mut ~[~Inner]) {
fn insert(t: ~Inner, active: &mut Vec<~Inner>) {
match active.iter().position(|tm| tm.target > t.target) {
Some(pos) => { active.insert(pos, t); }
None => { active.push(t); }
}
}

// signals the first requests in the queue, possible re-enqueueing it.
fn signal(active: &mut ~[~Inner], dead: &mut ~[(uint, ~Inner)]) {
fn signal(active: &mut Vec<~Inner>, dead: &mut Vec<(uint, ~Inner)>) {
let mut timer = match active.shift() {
Some(timer) => timer, None => return
};
Expand All @@ -137,15 +137,15 @@ fn helper(input: libc::c_int, messages: Receiver<Req>) {
let now = now();
// If this request has already expired, then signal it and go
// through another iteration
if active[0].target <= now {
if active.get(0).target <= now {
signal(&mut active, &mut dead);
continue;
}

// The actual timeout listed in the requests array is an
// absolute date, so here we translate the absolute time to a
// relative time.
let tm = active[0].target - now;
let tm = active.get(0).target - now;
timeout.tv_sec = (tm / 1000) as libc::time_t;
timeout.tv_usec = ((tm % 1000) * 1000) as libc::suseconds_t;
&timeout as *libc::timeval
Expand Down
12 changes: 6 additions & 6 deletions src/libnative/io/timer_timerfd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ fn helper(input: libc::c_int, messages: Receiver<Req>) {

add(efd, input);
let events: [imp::epoll_event, ..16] = unsafe { mem::init() };
let mut list: ~[(libc::c_int, Sender<()>, bool)] = ~[];
let mut list: Vec<(libc::c_int, Sender<()>, bool)> = vec![];
'outer: loop {
let n = match unsafe {
imp::epoll_wait(efd, events.as_ptr(),
Expand Down Expand Up @@ -104,9 +104,9 @@ fn helper(input: libc::c_int, messages: Receiver<Req>) {
// times?
let _ = FileDesc::new(fd, false).inner_read(bits).unwrap();
let (remove, i) = {
match list.bsearch(|&(f, _, _)| f.cmp(&fd)) {
match list.as_slice().bsearch(|&(f, _, _)| f.cmp(&fd)) {
Some(i) => {
let (_, ref c, oneshot) = list[i];
let (_, ref c, oneshot) = *list.get(i);
(!c.try_send(()) || oneshot, i)
}
None => fail!("fd not active: {}", fd),
Expand All @@ -128,9 +128,9 @@ fn helper(input: libc::c_int, messages: Receiver<Req>) {

// If we haven't previously seen the file descriptor, then
// we need to add it to the epoll set.
match list.bsearch(|&(f, _, _)| f.cmp(&fd)) {
match list.as_slice().bsearch(|&(f, _, _)| f.cmp(&fd)) {
Some(i) => {
drop(mem::replace(&mut list[i], (fd, chan, one)));
drop(mem::replace(list.get_mut(i), (fd, chan, one)));
}
None => {
match list.iter().position(|&(f, _, _)| f >= fd) {
Expand All @@ -150,7 +150,7 @@ fn helper(input: libc::c_int, messages: Receiver<Req>) {
}

Data(RemoveTimer(fd, chan)) => {
match list.bsearch(|&(f, _, _)| f.cmp(&fd)) {
match list.as_slice().bsearch(|&(f, _, _)| f.cmp(&fd)) {
Some(i) => {
drop(list.remove(i));
del(efd, fd);
Expand Down
6 changes: 3 additions & 3 deletions src/libnative/io/timer_win32.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ pub enum Req {
}

fn helper(input: libc::HANDLE, messages: Receiver<Req>) {
let mut objs = ~[input];
let mut chans = ~[];
let mut objs = vec![input];
let mut chans = vec![];

'outer: loop {
let idx = unsafe {
Expand Down Expand Up @@ -78,7 +78,7 @@ fn helper(input: libc::HANDLE, messages: Receiver<Req>) {
}
} else {
let remove = {
match &chans[idx as uint - 1] {
match chans.get(idx as uint - 1) {
&(ref c, oneshot) => !c.try_send(()) || oneshot
}
};
Expand Down