Skip to content

Commit 3b45e9d

Browse files
committed
---
yaml --- r: 167215 b: refs/heads/try c: e954fc4 h: refs/heads/master i: 167213: 3744730 167211: c83986f 167207: 75aca47 167199: 6743760 v: v3
1 parent b131c75 commit 3b45e9d

File tree

6 files changed

+93
-154
lines changed

6 files changed

+93
-154
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: 023dfb0c898d851dee6ace2f8339b73b5287136b
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 023dfb0c898d851dee6ace2f8339b73b5287136b
5-
refs/heads/try: 03a1188cf35b3765d8eb718d3b757c5a5d7e9497
5+
refs/heads/try: e954fc4385e92907916135244fd2fe0e47b24deb
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
88
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596

branches/try/src/etc/rustup.sh

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -229,18 +229,6 @@ validate_opt() {
229229
done
230230
}
231231

232-
create_tmp_dir() {
233-
local TMP_DIR=./rustup-tmp-install
234-
235-
rm -Rf "${TMP_DIR}"
236-
need_ok "failed to remove temporary installation directory"
237-
238-
mkdir -p "${TMP_DIR}"
239-
need_ok "failed to create create temporary installation directory"
240-
241-
echo $TMP_DIR
242-
}
243-
244232
probe_need CFG_CURL curl
245233
probe_need CFG_TAR tar
246234
probe_need CFG_FILE file
@@ -413,9 +401,7 @@ then
413401
CFG_INSTALL_FLAGS="${CFG_INSTALL_FLAGS} --prefix=${CFG_PREFIX}"
414402
fi
415403

416-
CFG_TMP_DIR=$(mktemp -d 2>/dev/null \
417-
|| mktemp -d -t 'rustup-tmp-install' 2>/dev/null \
418-
|| create_tmp_dir)
404+
CFG_TMP_DIR="./rustup-tmp-install"
419405

420406
RUST_URL="https://static.rust-lang.org/dist"
421407
RUST_PACKAGE_NAME=rust-nightly
@@ -438,6 +424,9 @@ download_package() {
438424

439425
msg "Downloading ${remote_tarball} to ${local_tarball}"
440426

427+
mkdir -p "${CFG_TMP_DIR}"
428+
need_ok "failed to create create download directory"
429+
441430
"${CFG_CURL}" -f -o "${local_tarball}" "${remote_tarball}"
442431
if [ $? -ne 0 ]
443432
then

branches/try/src/libcollections/dlist.rs

Lines changed: 4 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -655,7 +655,6 @@ impl<'a, A> DoubleEndedIterator<&'a mut A> for IterMut<'a, A> {
655655
impl<'a, A> ExactSizeIterator<&'a mut A> for IterMut<'a, A> {}
656656

657657
/// Allows mutating a `DList` while iterating.
658-
#[deprecated = "Trait is deprecated, use inherent methods on the iterator instead"]
659658
pub trait ListInsertion<A> {
660659
/// Inserts `elt` just after to the element most recently returned by
661660
/// `.next()`
@@ -690,50 +689,14 @@ impl<'a, A> IterMut<'a, A> {
690689
}
691690
}
692691

693-
impl<'a, A> IterMut<'a, A> {
694-
/// Inserts `elt` just after the element most recently returned by `.next()`.
695-
/// The inserted element does not appear in the iteration.
696-
///
697-
/// # Examples
698-
///
699-
/// ```rust
700-
/// use std::collections::DList;
701-
///
702-
/// let mut list: DList<int> = vec![1, 3, 4].into_iter().collect();
703-
///
704-
/// {
705-
/// let mut it = list.iter_mut();
706-
/// assert_eq!(it.next().unwrap(), &1);
707-
/// // insert `2` after `1`
708-
/// it.insert_next(2);
709-
/// }
710-
/// {
711-
/// let vec: Vec<int> = list.into_iter().collect();
712-
/// assert_eq!(vec, vec![1i, 2, 3, 4]);
713-
/// }
714-
/// ```
692+
impl<'a, A> ListInsertion<A> for IterMut<'a, A> {
715693
#[inline]
716-
pub fn insert_next(&mut self, elt: A) {
694+
fn insert_next(&mut self, elt: A) {
717695
self.insert_next_node(box Node::new(elt))
718696
}
719697

720-
/// Provides a reference to the next element, without changing the iterator.
721-
///
722-
/// # Examples
723-
///
724-
/// ```rust
725-
/// use std::collections::DList;
726-
///
727-
/// let mut list: DList<int> = vec![1, 2, 3].into_iter().collect();
728-
///
729-
/// let mut it = list.iter_mut();
730-
/// assert_eq!(it.next().unwrap(), &1);
731-
/// assert_eq!(it.peek_next().unwrap(), &2);
732-
/// // We just peeked at 2, so it was not consumed from the iterator.
733-
/// assert_eq!(it.next().unwrap(), &2);
734-
/// ```
735698
#[inline]
736-
pub fn peek_next(&mut self) -> Option<&mut A> {
699+
fn peek_next(&mut self) -> Option<&mut A> {
737700
if self.nelem == 0 {
738701
return None
739702
}
@@ -835,7 +798,7 @@ mod tests {
835798
use test::Bencher;
836799
use test;
837800

838-
use super::{DList, Node};
801+
use super::{DList, Node, ListInsertion};
839802

840803
pub fn check_links<T>(list: &DList<T>) {
841804
let mut len = 0u;

0 commit comments

Comments
 (0)