]> git.lizzy.rs Git - rust.git/blobdiff - src/libflate/lib.rs
std: Clean out deprecated APIs
[rust.git] / src / libflate / lib.rs
index f316250d96d710c3eb296784f48fcaab0f7df703..1cc008c5ee9cebd69c5120d7f2bd6bab5e8b13dd 100644 (file)
@@ -27,7 +27,7 @@
 #![feature(libc)]
 #![feature(staged_api)]
 #![feature(unique)]
-#![cfg_attr(test, feature(rustc_private, rand, vec_push_all))]
+#![cfg_attr(test, feature(rustc_private, rand))]
 
 #[cfg(test)]
 #[macro_use]
@@ -79,7 +79,10 @@ fn drop(&mut self) {
 }
 
 #[link(name = "miniz", kind = "static")]
-extern "C" {
+#[cfg(not(cargobuild))]
+extern {}
+
+extern {
     /// Raw miniz compression function.
     fn tdefl_compress_mem_to_heap(psrc_buf: *const c_void,
                                   src_buf_len: size_t,
@@ -170,7 +173,7 @@ fn test_flate_round_trip() {
         for _ in 0..20 {
             let mut input = vec![];
             for _ in 0..2000 {
-                input.push_all(r.choose(&words).unwrap());
+                input.extend_from_slice(r.choose(&words).unwrap());
             }
             debug!("de/inflate of {} bytes of random word-sequences",
                    input.len());