Skip to content

Commit 257998d

Browse files
cpetersocatamorphism
authored andcommitted
---
yaml --- r: 52030 b: refs/heads/dist-snap c: 8060bd8 h: refs/heads/master v: v3
1 parent f4ec4d7 commit 257998d

File tree

5 files changed

+13
-13
lines changed

5 files changed

+13
-13
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
99
refs/heads/incoming: 44d4d6de762f3f9aae1fedcf454c66b79b3ad58d
10-
refs/heads/dist-snap: c1e58aad70f01667145bfefd2c3eebe834156dc1
10+
refs/heads/dist-snap: 8060bd846af76798bf8585b20485cc66fbb865bc
1111
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1212
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1313
refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0

branches/dist-snap/src/libstd/arena.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ pub fn Arena() -> Arena {
9595
}
9696

9797
#[inline(always)]
98-
fn round_up_to(base: uint, align: uint) -> uint {
98+
pure fn round_up_to(base: uint, align: uint) -> uint {
9999
(base + (align - 1)) & !(align - 1)
100100
}
101101

branches/dist-snap/src/libstd/c_vec.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ pub fn set<T: Copy>(t: CVec<T>, ofs: uint, v: T) {
135135
*/
136136

137137
/// Returns the length of the vector
138-
pub fn len<T>(t: CVec<T>) -> uint {
138+
pub pure fn len<T>(t: CVec<T>) -> uint {
139139
return (*t).len;
140140
}
141141

branches/dist-snap/src/libstd/list.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ pub enum List<T> {
2222
Nil,
2323
}
2424

25-
/// Cregate a list from a vector
26-
pub fn from_vec<T: Copy>(v: &[T]) -> @List<T> {
25+
/// Create a list from a vector
26+
pub pure fn from_vec<T: Copy>(v: &[T]) -> @List<T> {
2727
vec::foldr(v, @Nil::<T>, |h, t| @Cons(*h, t))
2828
}
2929

@@ -53,7 +53,7 @@ pub fn foldl<T: Copy, U>(z: T, ls: @List<U>, f: fn(&T, &U) -> T) -> T {
5353
* When function `f` returns true then an option containing the element
5454
* is returned. If `f` matches no elements then none is returned.
5555
*/
56-
pub fn find<T: Copy>(ls: @List<T>, f: fn(&T) -> bool) -> Option<T> {
56+
pub pure fn find<T: Copy>(ls: @List<T>, f: fn(&T) -> bool) -> Option<T> {
5757
let mut ls = ls;
5858
loop {
5959
ls = match *ls {
@@ -88,7 +88,7 @@ pub pure fn is_not_empty<T: Copy>(ls: @List<T>) -> bool {
8888
}
8989

9090
/// Returns the length of a list
91-
pub fn len<T>(ls: @List<T>) -> uint {
91+
pub pure fn len<T>(ls: @List<T>) -> uint {
9292
let mut count = 0u;
9393
iter(ls, |_e| count += 1u);
9494
count
@@ -131,7 +131,7 @@ pure fn push<T: Copy>(ll: &mut @list<T>, vv: T) {
131131
*/
132132

133133
/// Iterate over a list
134-
pub fn iter<T>(l: @List<T>, f: fn(&T)) {
134+
pub pure fn iter<T>(l: @List<T>, f: fn(&T)) {
135135
let mut cur = l;
136136
loop {
137137
cur = match *cur {
@@ -145,7 +145,7 @@ pub fn iter<T>(l: @List<T>, f: fn(&T)) {
145145
}
146146

147147
/// Iterate over a list
148-
pub fn each<T>(l: @List<T>, f: fn(&T) -> bool) {
148+
pub pure fn each<T>(l: @List<T>, f: fn(&T) -> bool) {
149149
let mut cur = l;
150150
loop {
151151
cur = match *cur {

branches/dist-snap/src/libstd/rope.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ pub type Rope = node::Root;
4343
*/
4444

4545
/// Create an empty rope
46-
pub fn empty() -> Rope {
46+
pub pure fn empty() -> Rope {
4747
return node::Empty;
4848
}
4949

@@ -479,7 +479,7 @@ pub mod iterator {
479479
*
480480
* Constant time.
481481
*/
482-
pub fn height(rope: Rope) -> uint {
482+
pub pure fn height(rope: Rope) -> uint {
483483
match (rope) {
484484
node::Empty => return 0u,
485485
node::Content(x) => return node::height(x)
@@ -1019,7 +1019,7 @@ mod node {
10191019
})
10201020
}
10211021

1022-
pub fn height(node: @Node) -> uint {
1022+
pub pure fn height(node: @Node) -> uint {
10231023
match (*node) {
10241024
Leaf(_) => return 0u,
10251025
Concat(ref x) => return x.height
@@ -1100,7 +1100,7 @@ mod node {
11001100
* proportional to the height of the rope + the (bounded)
11011101
* length of the largest leaf.
11021102
*/
1103-
pub fn char_at(node: @Node, pos: uint) -> char {
1103+
pub pure fn char_at(node: @Node, pos: uint) -> char {
11041104
let mut node = node;
11051105
let mut pos = pos;
11061106
loop {

0 commit comments

Comments
 (0)