about summary refs log tree commit diff
path: root/src/libcore
diff options
context:
space:
mode:
authorKevin Cantu <me@kevincantu.org>2012-01-23 03:04:33 -0800
committerNiko Matsakis <niko@alum.mit.edu>2012-01-23 22:28:25 -0800
commit1c54744e3f63bb32ea7845a242178eec450fdf3b (patch)
tree03e6d3aecc293c68dad112b2d4bde568c92542de /src/libcore
parentff9502917125f3bfb8ebad252a1c8d3a4f6e0320 (diff)
fixing indentation
Diffstat (limited to 'src/libcore')
-rw-r--r--src/libcore/str.rs58
1 files changed, 29 insertions, 29 deletions
diff --git a/src/libcore/str.rs b/src/libcore/str.rs
index 6dda818624c..253d6e5dfb1 100644
--- a/src/libcore/str.rs
+++ b/src/libcore/str.rs
@@ -363,7 +363,7 @@ Iterate over the characters in a string
 FIXME: A synonym to iter_chars
 */
 fn chars_iter(ss: str, it: fn&(char)) {
-   iter_chars(ss, it)
+    iter_chars(ss, it)
 }
 
 /*
@@ -374,13 +374,13 @@ Iterate over the bytes in a string
 FIXME: Should it really include the last byte '\0'?
 */
 fn bytes_iter(ss: str, it: fn&(u8)) {
-   let pos = 0u;
-   let len = byte_len(ss);
+    let pos = 0u;
+    let len = byte_len(ss);
 
-   while (pos < len) {
-      it(ss[pos]);
-      pos += 1u;
-   }
+    while (pos < len) {
+        it(ss[pos]);
+        pos += 1u;
+    }
 }
 
 /*
@@ -920,7 +920,7 @@ Function: words_iter
 Apply a function to each word
 */
 fn words_iter(ss: str, ff: fn&(&&str)) {
-   vec::iter(words(ss), ff)
+    vec::iter(words(ss), ff)
 }
 
 /*
@@ -1723,29 +1723,29 @@ mod tests {
         assert(escape("abc\"def") == "abc\\\"def");
     }
 
-   #[test]
-   fn test_map() {
-      assert "" == map("", char::to_upper);
-      assert "YMCA" == map("ymca", char::to_upper);
-   }
+    #[test]
+    fn test_map() {
+        assert "" == map("", char::to_upper);
+        assert "YMCA" == map("ymca", char::to_upper);
+    }
 
-   #[test]
-   fn test_all() {
-       assert true  == all("", char::is_uppercase);
-       assert false == all("ymca", char::is_uppercase);
-       assert true  == all("YMCA", char::is_uppercase);
-       assert false == all("yMCA", char::is_uppercase);
-       assert false == all("YMCy", char::is_uppercase);
-   }
+    #[test]
+    fn test_all() {
+        assert true  == all("", char::is_uppercase);
+        assert false == all("ymca", char::is_uppercase);
+        assert true  == all("YMCA", char::is_uppercase);
+        assert false == all("yMCA", char::is_uppercase);
+        assert false == all("YMCy", char::is_uppercase);
+    }
 
-   #[test]
-   fn test_any() {
-       assert false  == any("", char::is_uppercase);
-       assert false == any("ymca", char::is_uppercase);
-       assert true  == any("YMCA", char::is_uppercase);
-       assert true == any("yMCA", char::is_uppercase);
-       assert true == any("YMCy", char::is_uppercase);
-   }
+    #[test]
+    fn test_any() {
+        assert false  == any("", char::is_uppercase);
+        assert false == any("ymca", char::is_uppercase);
+        assert true  == any("YMCA", char::is_uppercase);
+        assert true == any("yMCA", char::is_uppercase);
+        assert true == any("YMCy", char::is_uppercase);
+    }
 
     #[test]
     fn test_windowed() {