Skip to content

Commit 6113d13

Browse files
committed
---
yaml --- r: 125679 b: refs/heads/try c: 31eb00c h: refs/heads/master i: 125677: 5226ca1 125675: 8daaa00 125671: 33f8717 125663: 003bef4 v: v3
1 parent 406d0fe commit 6113d13

File tree

136 files changed

+1253
-3639
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

136 files changed

+1253
-3639
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: f2fa55903e378368ed9173560f03a0ef16e371c2
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 9fc8394d3bce22ab483f98842434c84c396212ae
5-
refs/heads/try: d8652de94231114f96e022cdb84ce31490874ea9
5+
refs/heads/try: 31eb00c022aba208921046cdec046f77a96ec98c
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c

branches/try/mk/docs.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ DOCS := index intro tutorial guide guide-ffi guide-macros guide-lifetimes \
3030
guide-tasks guide-container guide-pointers guide-testing \
3131
guide-runtime complement-bugreport \
3232
complement-lang-faq complement-design-faq complement-project-faq rust \
33-
rustdoc guide-unsafe guide-strings
33+
rustdoc guide-unsafe
3434

3535
PDF_DOCS := tutorial rust
3636

branches/try/src/doc/guide-strings.md

Lines changed: 0 additions & 127 deletions
This file was deleted.

branches/try/src/doc/index.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ li {list-style-type: none; }
1313

1414
# Guides
1515

16-
* [Strings](guide-strings.html)
1716
* [Pointers](guide-pointers.html)
1817
* [References and Lifetimes](guide-lifetimes.html)
1918
* [Containers and Iterators](guide-container.html)

branches/try/src/libcollections/btree.rs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -365,12 +365,12 @@ impl<K: Clone + Ord, V: Clone> Leaf<K, V> {
365365
return (Node::new_leaf(self.clone().elts), false);
366366
}
367367
//If there is an index, insert at that index.
368-
Some(i) => {
369-
if i >= self.elts.len() {
368+
_ => {
369+
if index.unwrap() >= self.elts.len() {
370370
self.elts.push(to_insert.clone());
371371
}
372372
else {
373-
self.elts.insert(i, to_insert.clone());
373+
self.elts.insert(index.unwrap(), to_insert.clone());
374374
}
375375
}
376376
}
@@ -526,16 +526,16 @@ impl<K: Clone + Ord, V: Clone> Branch<K, V> {
526526
self.clone().rightmost_child),
527527
outcome);
528528
}
529-
Some(i) => {
530-
if i == self.elts.len() {
529+
_ => {
530+
if index.unwrap() == self.elts.len() {
531531
let new_outcome = self.clone().rightmost_child.insert(k.clone(),
532532
v.clone(),
533533
ub.clone());
534534
new_branch = new_outcome.clone().val0();
535535
outcome = new_outcome.val1();
536536
}
537537
else {
538-
let new_outcome = self.elts.get(i).left.clone().insert(k.clone(),
538+
let new_outcome = self.elts.get(index.unwrap()).left.clone().insert(k.clone(),
539539
v.clone(),
540540
ub.clone());
541541
new_branch = new_outcome.clone().val0();
@@ -547,11 +547,11 @@ impl<K: Clone + Ord, V: Clone> Branch<K, V> {
547547
//If we have a leaf, we do not need to resize the tree,
548548
//so we can return false.
549549
LeafNode(..) => {
550-
if i == self.elts.len() {
550+
if index.unwrap() == self.elts.len() {
551551
self.rightmost_child = box new_branch.clone();
552552
}
553553
else {
554-
self.elts.get_mut(i).left = box new_branch.clone();
554+
self.elts.get_mut(index.unwrap()).left = box new_branch.clone();
555555
}
556556
return (Node::new_branch(self.clone().elts,
557557
self.clone().rightmost_child),
@@ -589,13 +589,13 @@ impl<K: Clone + Ord, V: Clone> Branch<K, V> {
589589
self.clone().rightmost_child),
590590
false);
591591
}
592-
Some(i) => {
593-
self.elts.insert(i, new_elt);
594-
if i + 1 >= self.elts.len() {
592+
_ => {
593+
self.elts.insert(new_elt_index.unwrap(), new_elt);
594+
if new_elt_index.unwrap() + 1 >= self.elts.len() {
595595
self.rightmost_child = branch.clone().rightmost_child;
596596
}
597597
else {
598-
self.elts.get_mut(i + 1).left =
598+
self.elts.get_mut(new_elt_index.unwrap() + 1).left =
599599
branch.clone().rightmost_child;
600600
}
601601
}

branches/try/src/libcollections/dlist.rs

Lines changed: 0 additions & 91 deletions
Original file line numberDiff line numberDiff line change
@@ -278,23 +278,6 @@ impl<T> DList<T> {
278278
/// Move the last element to the front of the list.
279279
///
280280
/// If the list is empty, do nothing.
281-
///
282-
/// # Example
283-
///
284-
/// ```rust
285-
/// use std::collections::{DList, Deque};
286-
///
287-
/// let mut dl = DList::new();
288-
/// dl.push_back(1i);
289-
/// dl.push_back(2);
290-
/// dl.push_back(3);
291-
///
292-
/// dl.rotate_forward();
293-
///
294-
/// for e in dl.iter() {
295-
/// println!("{}", e); // prints 3, then 1, then 2
296-
/// }
297-
/// ```
298281
#[inline]
299282
pub fn rotate_forward(&mut self) {
300283
self.pop_back_node().map(|tail| {
@@ -305,23 +288,6 @@ impl<T> DList<T> {
305288
/// Move the first element to the back of the list.
306289
///
307290
/// If the list is empty, do nothing.
308-
///
309-
/// # Example
310-
///
311-
/// ```rust
312-
/// use std::collections::{DList, Deque};
313-
///
314-
/// let mut dl = DList::new();
315-
/// dl.push_back(1i);
316-
/// dl.push_back(2);
317-
/// dl.push_back(3);
318-
///
319-
/// dl.rotate_backward();
320-
///
321-
/// for e in dl.iter() {
322-
/// println!("{}", e); // prints 2, then 3, then 1
323-
/// }
324-
/// ```
325291
#[inline]
326292
pub fn rotate_backward(&mut self) {
327293
self.pop_front_node().map(|head| {
@@ -332,25 +298,6 @@ impl<T> DList<T> {
332298
/// Add all elements from `other` to the end of the list
333299
///
334300
/// O(1)
335-
///
336-
/// # Example
337-
///
338-
/// ```rust
339-
/// use std::collections::{DList, Deque};
340-
///
341-
/// let mut a = DList::new();
342-
/// let mut b = DList::new();
343-
/// a.push_back(1i);
344-
/// a.push_back(2);
345-
/// b.push_back(3i);
346-
/// b.push_back(4);
347-
///
348-
/// a.append(b);
349-
///
350-
/// for e in a.iter() {
351-
/// println!("{}", e); // prints 1, then 2, then 3, then 4
352-
/// }
353-
/// ```
354301
pub fn append(&mut self, mut other: DList<T>) {
355302
match self.list_tail.resolve() {
356303
None => *self = other,
@@ -373,25 +320,6 @@ impl<T> DList<T> {
373320
/// Add all elements from `other` to the beginning of the list
374321
///
375322
/// O(1)
376-
///
377-
/// # Example
378-
///
379-
/// ```rust
380-
/// use std::collections::{DList, Deque};
381-
///
382-
/// let mut a = DList::new();
383-
/// let mut b = DList::new();
384-
/// a.push_back(1i);
385-
/// a.push_back(2);
386-
/// b.push_back(3i);
387-
/// b.push_back(4);
388-
///
389-
/// a.prepend(b);
390-
///
391-
/// for e in a.iter() {
392-
/// println!("{}", e); // prints 3, then 4, then 1, then 2
393-
/// }
394-
/// ```
395323
#[inline]
396324
pub fn prepend(&mut self, mut other: DList<T>) {
397325
mem::swap(self, &mut other);
@@ -402,25 +330,6 @@ impl<T> DList<T> {
402330
/// or at the end.
403331
///
404332
/// O(N)
405-
///
406-
/// # Example
407-
///
408-
/// ```rust
409-
/// use std::collections::{DList, Deque};
410-
///
411-
/// let mut a: DList<int> = DList::new();
412-
/// a.push_back(2i);
413-
/// a.push_back(4);
414-
/// a.push_back(7);
415-
/// a.push_back(8);
416-
///
417-
/// // insert 11 before the first odd number in the list
418-
/// a.insert_when(11, |&e, _| e % 2 == 1);
419-
///
420-
/// for e in a.iter() {
421-
/// println!("{}", e); // prints 2, then 4, then 11, then 7, then 8
422-
/// }
423-
/// ```
424333
pub fn insert_when(&mut self, elt: T, f: |&T, &T| -> bool) {
425334
{
426335
let mut it = self.mut_iter();

0 commit comments

Comments
 (0)