Skip to content

Commit 12858d8

Browse files
committed
---
yaml --- r: 127102 b: refs/heads/snap-stage3 c: 2574160 h: refs/heads/master v: v3
1 parent 7c1265d commit 12858d8

File tree

5 files changed

+17
-4
lines changed

5 files changed

+17
-4
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: 7be8f0af0393dcdb077c2f6b1653836fd3fba235
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 7ba9c44b94a0b9141045cdc385cd68145c1cdbc6
4+
refs/heads/snap-stage3: 25741603fe3d5caebda7d41babb7eb0c265dfc70
55
refs/heads/try: 502e4c045236682e9728539dc0d2b3d0b237f55c
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,12 @@
6464
/nd/
6565
/rt/
6666
/rustllvm/
67+
/src/libunicode/DerivedCoreProperties.txt
68+
/src/libunicode/EastAsianWidth.txt
69+
/src/libunicode/HangulSyllableType.txt
70+
/src/libunicode/PropList.txt
71+
/src/libunicode/Scripts.txt
72+
/src/libunicode/UnicodeData.txt
6773
/stage0/
6874
/stage1/
6975
/stage2/

branches/snap-stage3/src/libcollections/vec.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -964,7 +964,7 @@ impl<T> Vec<T> {
964964
#[inline]
965965
pub fn swap_remove(&mut self, index: uint) -> Option<T> {
966966
let length = self.len();
967-
if index < length - 1 {
967+
if length > 0 && index < length - 1 {
968968
self.as_mut_slice().swap(index, length - 1);
969969
} else if index >= length {
970970
return None
@@ -2003,6 +2003,12 @@ mod tests {
20032003
let _ = vec[3];
20042004
}
20052005

2006+
#[test]
2007+
fn test_swap_remove_empty() {
2008+
let mut vec: Vec<uint> = vec!();
2009+
assert_eq!(vec.swap_remove(0), None);
2010+
}
2011+
20062012
#[bench]
20072013
fn bench_new(b: &mut Bencher) {
20082014
b.iter(|| {

branches/snap-stage3/src/librustdoc/html/layout.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ r##"<!DOCTYPE html>
3939
<meta charset="utf-8">
4040
<meta name="viewport" content="width=device-width, initial-scale=1.0">
4141
<meta name="description" content="The {krate} library documentation.">
42+
<meta name="generator" content="rustdoc">
4243
4344
<title>{title}</title>
4445
@@ -47,7 +48,7 @@ r##"<!DOCTYPE html>
4748
{favicon}
4849
{in_header}
4950
</head>
50-
<body>
51+
<body class="rustdoc">
5152
<!--[if lte IE 8]>
5253
<div class="warning">
5354
This old browser is unsupported and will most likely display funky

branches/snap-stage3/src/librustdoc/markdown.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ pub fn render(input: &str, mut output: Path, matches: &getopts::Matches,
9898
{css}
9999
{in_header}
100100
</head>
101-
<body>
101+
<body class="rustdoc">
102102
<!--[if lte IE 8]>
103103
<div class="warning">
104104
This old browser is unsupported and will most likely display funky

0 commit comments

Comments
 (0)