Skip to content

Commit adf5144

Browse files
committed
---
yaml --- r: 132472 b: refs/heads/dist-snap c: 2574160 h: refs/heads/master v: v3
1 parent 9755de5 commit adf5144

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
@@ -6,7 +6,7 @@ refs/heads/try: 457a3c991d79b971be07fce75f9d0c12848fb37c
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
9-
refs/heads/dist-snap: 7ba9c44b94a0b9141045cdc385cd68145c1cdbc6
9+
refs/heads/dist-snap: 25741603fe3d5caebda7d41babb7eb0c265dfc70
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1212
refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0

branches/dist-snap/.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/dist-snap/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/dist-snap/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/dist-snap/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)