From 2ed980fe253d0b7103ff0b16ce2aeecb03f09203 Mon Sep 17 00:00:00 2001 From: Huon Wilson Date: Sat, 1 Feb 2014 15:57:17 +1100 Subject: std,extra: remove use of & support for @[]. --- src/libextra/num/bigint.rs | 2 +- src/libextra/serialize.rs | 21 --------------------- 2 files changed, 1 insertion(+), 22 deletions(-) (limited to 'src/libextra') diff --git a/src/libextra/num/bigint.rs b/src/libextra/num/bigint.rs index c1959843d59..cea899b18c0 100644 --- a/src/libextra/num/bigint.rs +++ b/src/libextra/num/bigint.rs @@ -80,7 +80,7 @@ pub mod BigDigit { /** A big unsigned integer type. -A `BigUint`-typed value `BigUint { data: @[a, b, c] }` represents a number +A `BigUint`-typed value `BigUint { data: ~[a, b, c] }` represents a number `(a + b * BigDigit::base + c * BigDigit::base^2)`. */ #[deriving(Clone)] diff --git a/src/libextra/serialize.rs b/src/libextra/serialize.rs index fa2737ce75f..9b1b1e0548e 100644 --- a/src/libextra/serialize.rs +++ b/src/libextra/serialize.rs @@ -18,7 +18,6 @@ Core encoding and decoding interfaces. #[forbid(non_camel_case_types)]; -use std::at_vec; use std::hashmap::{HashMap, HashSet}; use std::rc::Rc; use std::trie::{TrieMap, TrieSet}; @@ -444,26 +443,6 @@ impl> Decodable for ~[T] { } } -impl> Encodable for @[T] { - fn encode(&self, s: &mut S) { - s.emit_seq(self.len(), |s| { - for (i, e) in self.iter().enumerate() { - s.emit_seq_elt(i, |s| e.encode(s)) - } - }) - } -} - -impl> Decodable for @[T] { - fn decode(d: &mut D) -> @[T] { - d.read_seq(|d, len| { - at_vec::from_fn(len, |i| { - d.read_seq_elt(i, |d| Decodable::decode(d)) - }) - }) - } -} - impl> Encodable for Option { fn encode(&self, s: &mut S) { s.emit_option(|s| { -- cgit 1.4.1-3-g733a5