about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorMarvin Löbel <loebel.marvin@gmail.com>2013-03-21 12:36:21 +0100
committerMarvin Löbel <loebel.marvin@gmail.com>2013-03-21 14:05:57 +0100
commit9d9a209e9a61414cdf9c8065d445ce353d6ed45f (patch)
tree11ec8b9926019a8864066990c5bf34860620c1a7 /src/libstd
parent8f4448837b09fe644524ba28d59dee08950ef6b5 (diff)
downloadrust-9d9a209e9a61414cdf9c8065d445ce353d6ed45f.tar.gz
rust-9d9a209e9a61414cdf9c8065d445ce353d6ed45f.zip
back-renamed slice_DBG_BRWD, slice_V_DBG_BRWD -> slice, slice_DBG_UNIQ -> slice_unique
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/bitv.rs6
-rw-r--r--src/libstd/flatpipes.rs2
-rw-r--r--src/libstd/getopts.rs4
-rw-r--r--src/libstd/net_url.rs40
-rw-r--r--src/libstd/rope.rs2
-rw-r--r--src/libstd/sha1.rs2
6 files changed, 28 insertions, 28 deletions
diff --git a/src/libstd/bitv.rs b/src/libstd/bitv.rs
index cbf605e7258..d4b4c7b097c 100644
--- a/src/libstd/bitv.rs
+++ b/src/libstd/bitv.rs
@@ -831,7 +831,7 @@ priv impl BitvSet {
                         f: &fn(uint, uint, uint) -> bool) {
         let min = uint::min(self.bitv.storage.len(),
                             other.bitv.storage.len());
-        for self.bitv.storage.slice_V_DBG_BRWD(0, min).eachi |i, &w| {
+        for self.bitv.storage.slice(0, min).eachi |i, &w| {
             if !f(i * uint::bits, w, other.bitv.storage[i]) {
                 return;
             }
@@ -852,12 +852,12 @@ priv impl BitvSet {
         let min = uint::min(len1, len2);
 
         /* only one of these loops will execute and that's the point */
-        for self.bitv.storage.slice_V_DBG_BRWD(min, len1).eachi |i, &w| {
+        for self.bitv.storage.slice(min, len1).eachi |i, &w| {
             if !f(true, (i + min) * uint::bits, w) {
                 return;
             }
         }
-        for other.bitv.storage.slice_V_DBG_BRWD(min, len2).eachi |i, &w| {
+        for other.bitv.storage.slice(min, len2).eachi |i, &w| {
             if !f(false, (i + min) * uint::bits, w) {
                 return;
             }
diff --git a/src/libstd/flatpipes.rs b/src/libstd/flatpipes.rs
index 176d3c73b62..105e34761a8 100644
--- a/src/libstd/flatpipes.rs
+++ b/src/libstd/flatpipes.rs
@@ -571,7 +571,7 @@ pub mod bytepipes {
         fn try_recv(&self, count: uint) -> Option<~[u8]> {
             if vec::uniq_len(&const self.buf) >= count {
                 let mut bytes = ::core::util::replace(&mut self.buf, ~[]);
-                self.buf = bytes.slice_V_DBG_BRWD(count, bytes.len()).to_owned();
+                self.buf = bytes.slice(count, bytes.len()).to_owned();
                 bytes.truncate(count);
                 return Some(bytes);
             } else if vec::uniq_len(&const self.buf) > 0 {
diff --git a/src/libstd/getopts.rs b/src/libstd/getopts.rs
index f19def7ad86..e2702b7d566 100644
--- a/src/libstd/getopts.rs
+++ b/src/libstd/getopts.rs
@@ -243,7 +243,7 @@ pub fn getopts(args: &[~str], opts: &[Opt]) -> Result {
                 let mut names;
                 let mut i_arg = None;
                 if cur[1] == '-' as u8 {
-                    let tail = str::slice_DBG_BRWD(cur, 2, curlen).to_owned();
+                    let tail = str::slice(cur, 2, curlen).to_owned();
                     let tail_eq = str::splitn_char(tail, '=', 1);
                     if tail_eq.len() <= 1 {
                         names = ~[Long(tail)];
@@ -279,7 +279,7 @@ pub fn getopts(args: &[~str], opts: &[Opt]) -> Result {
                                   No => false
                                 };
                             if arg_follows && j < curlen {
-                                i_arg = Some(cur.slice_DBG_BRWD(j, curlen).to_owned());
+                                i_arg = Some(cur.slice(j, curlen).to_owned());
                                 break;
                             } else {
                                 last_valid_opt_id = None;
diff --git a/src/libstd/net_url.rs b/src/libstd/net_url.rs
index c5d0446f156..4943b374980 100644
--- a/src/libstd/net_url.rs
+++ b/src/libstd/net_url.rs
@@ -317,10 +317,10 @@ pure fn split_char_first(s: &str, c: char) -> (~str, ~str) {
         }
     }
     if index+mat == len {
-        return (str::slice_DBG_BRWD(s, 0, index).to_owned(), ~"");
+        return (str::slice(s, 0, index).to_owned(), ~"");
     } else {
-        return (str::slice_DBG_BRWD(s, 0, index).to_owned(),
-             str::slice_DBG_BRWD(s, index + mat, str::len(s)).to_owned());
+        return (str::slice(s, 0, index).to_owned(),
+             str::slice(s, index + mat, str::len(s)).to_owned());
     }
 }
 
@@ -386,8 +386,8 @@ pub pure fn get_scheme(rawurl: &str) -> Result<(~str, ~str), ~str> {
             if i == 0 {
                 return Err(~"url: Scheme cannot be empty.");
             } else {
-                return Ok((rawurl.slice_DBG_BRWD(0,i).to_owned(),
-                                rawurl.slice_DBG_BRWD(i+1,str::len(rawurl)).to_owned()));
+                return Ok((rawurl.slice(0,i).to_owned(),
+                                rawurl.slice(i+1,str::len(rawurl)).to_owned()));
             }
           }
           _ => {
@@ -489,7 +489,7 @@ pure fn get_authority(rawurl: &str) ->
               }
               Ip6Host => {
                 if colon_count > 7 {
-                    host = str::slice_DBG_BRWD(rawurl, begin, i).to_owned();
+                    host = str::slice(rawurl, begin, i).to_owned();
                     pos = i;
                     st = InPort;
                 }
@@ -506,13 +506,13 @@ pure fn get_authority(rawurl: &str) ->
             colon_count = 0; // reset count
             match st {
               Start => {
-                let user = str::slice_DBG_BRWD(rawurl, begin, i).to_owned();
+                let user = str::slice(rawurl, begin, i).to_owned();
                 userinfo = Some(UserInfo::new(user, None));
                 st = InHost;
               }
               PassHostPort => {
-                let user = str::slice_DBG_BRWD(rawurl, begin, pos).to_owned();
-                let pass = str::slice_DBG_BRWD(rawurl, pos+1, i).to_owned();
+                let user = str::slice(rawurl, begin, pos).to_owned();
+                let pass = str::slice(rawurl, pos+1, i).to_owned();
                 userinfo = Some(UserInfo::new(user, Some(pass)));
                 st = InHost;
               }
@@ -543,31 +543,31 @@ pure fn get_authority(rawurl: &str) ->
     match st {
       Start => {
         if host_is_end_plus_one() {
-            host = str::slice_DBG_BRWD(rawurl, begin, end+1).to_owned();
+            host = str::slice(rawurl, begin, end+1).to_owned();
         } else {
-            host = str::slice_DBG_BRWD(rawurl, begin, end).to_owned();
+            host = str::slice(rawurl, begin, end).to_owned();
         }
       }
       PassHostPort | Ip6Port => {
         if in != Digit {
             return Err(~"Non-digit characters in port.");
         }
-        host = str::slice_DBG_BRWD(rawurl, begin, pos).to_owned();
-        port = Some(str::slice_DBG_BRWD(rawurl, pos+1, end).to_owned());
+        host = str::slice(rawurl, begin, pos).to_owned();
+        port = Some(str::slice(rawurl, pos+1, end).to_owned());
       }
       Ip6Host | InHost => {
-        host = str::slice_DBG_BRWD(rawurl, begin, end).to_owned();
+        host = str::slice(rawurl, begin, end).to_owned();
       }
       InPort => {
         if in != Digit {
             return Err(~"Non-digit characters in port.");
         }
-        port = Some(str::slice_DBG_BRWD(rawurl, pos+1, end).to_owned());
+        port = Some(str::slice(rawurl, pos+1, end).to_owned());
       }
     }
 
     let rest = if host_is_end_plus_one() { ~"" }
-    else { str::slice_DBG_BRWD(rawurl, end, len).to_owned() };
+    else { str::slice(rawurl, end, len).to_owned() };
     return Ok((userinfo, host, port, rest));
 }
 
@@ -599,8 +599,8 @@ pure fn get_path(rawurl: &str, authority: bool) ->
         }
     }
 
-    return Ok((decode_component(str::slice_DBG_BRWD(rawurl, 0, end).to_owned()),
-                    str::slice_DBG_BRWD(rawurl, end, len).to_owned()));
+    return Ok((decode_component(str::slice(rawurl, 0, end).to_owned()),
+                    str::slice(rawurl, end, len).to_owned()));
 }
 
 // returns the parsed query and the fragment, if present
@@ -608,7 +608,7 @@ pure fn get_query_fragment(rawurl: &str) ->
     Result<(Query, Option<~str>), ~str> {
     if !str::starts_with(rawurl, ~"?") {
         if str::starts_with(rawurl, ~"#") {
-            let f = decode_component(str::slice_DBG_BRWD(rawurl,
+            let f = decode_component(str::slice(rawurl,
                                                 1,
                                                 str::len(rawurl)).to_owned());
             return Ok((~[], Some(f)));
@@ -616,7 +616,7 @@ pure fn get_query_fragment(rawurl: &str) ->
             return Ok((~[], None));
         }
     }
-    let (q, r) = split_char_first(str::slice_DBG_BRWD(rawurl, 1,
+    let (q, r) = split_char_first(str::slice(rawurl, 1,
                                              str::len(rawurl)).to_owned(), '#');
     let f = if str::len(r) != 0 {
         Some(decode_component(r)) } else { None };
diff --git a/src/libstd/rope.rs b/src/libstd/rope.rs
index f796a7fa98e..ff7d4ec3b1c 100644
--- a/src/libstd/rope.rs
+++ b/src/libstd/rope.rs
@@ -1293,7 +1293,7 @@ mod tests {
                 unsafe {
                     match (*node) {
                       node::Leaf(x) => {
-                        *str += str::slice_DBG_BRWD(
+                        *str += str::slice(
                             *x.content, x.byte_offset,
                             x.byte_offset + x.byte_len).to_owned();
                       }
diff --git a/src/libstd/sha1.rs b/src/libstd/sha1.rs
index e4723ff0a2b..077ab191e69 100644
--- a/src/libstd/sha1.rs
+++ b/src/libstd/sha1.rs
@@ -398,7 +398,7 @@ mod tests {
                 let mut left = len;
                 while left > 0u {
                     let take = (left + 1u) / 2u;
-                    sh.input_str(str::slice_DBG_BRWD(t.input, len - left,
+                    sh.input_str(str::slice(t.input, len - left,
                                  take + len - left).to_owned());
                     left = left - take;
                 }