about summary refs log tree commit diff
path: root/src/libstd/io
diff options
context:
space:
mode:
authorManish Goregaokar <manishsmail@gmail.com>2015-02-22 01:53:16 +0530
committerManish Goregaokar <manishsmail@gmail.com>2015-02-22 01:53:16 +0530
commit59ab2daad3a2a78ba8d72689b684aff6a751b992 (patch)
treefde20950cca6318f89f21fc843ba03a16513b324 /src/libstd/io
parent494dbe9c07839a8eeb2b035f86011df52f625a2d (diff)
parentac7d964dcf62f4c6104ae8d6bf3713f697215769 (diff)
downloadrust-59ab2daad3a2a78ba8d72689b684aff6a751b992.tar.gz
rust-59ab2daad3a2a78ba8d72689b684aff6a751b992.zip
Rollup merge of #22567 - Gankro:unstable, r=alexcrichton
 * Adds features and allows
* Removes unused muts, unused imports, dead code
* Migrates some deprecated code to new io/env
* Changes std::num::uint/int to be re-exports of std::num::usize/isize

libcollections, liballoc, and libcoretest no longer warn during testing.

libstd warns much less, though there's some dangly bits that weren't obvious fixes. In particular, how to only supress deprecated warnings in specific submodules of std.
Diffstat (limited to 'src/libstd/io')
-rw-r--r--src/libstd/io/buffered.rs7
-rw-r--r--src/libstd/io/mod.rs8
2 files changed, 7 insertions, 8 deletions
diff --git a/src/libstd/io/buffered.rs b/src/libstd/io/buffered.rs
index e9a8dbb4098..9ef31978236 100644
--- a/src/libstd/io/buffered.rs
+++ b/src/libstd/io/buffered.rs
@@ -497,7 +497,6 @@ mod tests {
         assert_eq!(*writer.get_ref(), [0, 1, 2, 3, 4, 5, 6, 7, 8]);
 
         writer.write(&[9, 10, 11]).unwrap();
-        let a: &[_] = &[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11];
         assert_eq!(*writer.get_ref(), [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]);
 
         writer.flush().unwrap();
@@ -593,7 +592,7 @@ mod tests {
     #[test]
     fn test_lines() {
         let in_buf = b"a\nb\nc";
-        let mut reader = BufReader::with_capacity(2, in_buf);
+        let reader = BufReader::with_capacity(2, in_buf);
         let mut it = reader.lines();
         assert_eq!(it.next(), Some(Ok("a".to_string())));
         assert_eq!(it.next(), Some(Ok("b".to_string())));
@@ -618,14 +617,14 @@ mod tests {
     #[test]
     fn read_char_buffered() {
         let buf = [195u8, 159u8];
-        let mut reader = BufReader::with_capacity(1, &buf[..]);
+        let reader = BufReader::with_capacity(1, &buf[..]);
         assert_eq!(reader.chars().next(), Some(Ok('ß')));
     }
 
     #[test]
     fn test_chars() {
         let buf = [195u8, 159u8, b'a'];
-        let mut reader = BufReader::with_capacity(1, &buf[..]);
+        let reader = BufReader::with_capacity(1, &buf[..]);
         let mut it = reader.chars();
         assert_eq!(it.next(), Some(Ok('ß')));
         assert_eq!(it.next(), Some(Ok('a')));
diff --git a/src/libstd/io/mod.rs b/src/libstd/io/mod.rs
index 1133bd87a7d..5b319f4c687 100644
--- a/src/libstd/io/mod.rs
+++ b/src/libstd/io/mod.rs
@@ -869,12 +869,12 @@ mod tests {
 
     #[test]
     fn split() {
-        let mut buf = Cursor::new(b"12");
+        let buf = Cursor::new(b"12");
         let mut s = buf.split(b'3');
         assert_eq!(s.next(), Some(Ok(vec![b'1', b'2'])));
         assert_eq!(s.next(), None);
 
-        let mut buf = Cursor::new(b"1233");
+        let buf = Cursor::new(b"1233");
         let mut s = buf.split(b'3');
         assert_eq!(s.next(), Some(Ok(vec![b'1', b'2'])));
         assert_eq!(s.next(), Some(Ok(vec![])));
@@ -902,12 +902,12 @@ mod tests {
 
     #[test]
     fn lines() {
-        let mut buf = Cursor::new(b"12");
+        let buf = Cursor::new(b"12");
         let mut s = buf.lines();
         assert_eq!(s.next(), Some(Ok("12".to_string())));
         assert_eq!(s.next(), None);
 
-        let mut buf = Cursor::new(b"12\n\n");
+        let buf = Cursor::new(b"12\n\n");
         let mut s = buf.lines();
         assert_eq!(s.next(), Some(Ok("12".to_string())));
         assert_eq!(s.next(), Some(Ok(String::new())));