diff options
| author | Huon Wilson <dbau.pp+github@gmail.com> | 2014-02-01 15:57:17 +1100 |
|---|---|---|
| committer | Huon Wilson <dbau.pp+github@gmail.com> | 2014-02-02 02:59:03 +1100 |
| commit | 2ed980fe253d0b7103ff0b16ce2aeecb03f09203 (patch) | |
| tree | 7c4892e371519a81effee35d982f4caaf0b23453 /src/libextra | |
| parent | e0c1707560d02bb5805b33cb17e8abfc339eb16b (diff) | |
| download | rust-2ed980fe253d0b7103ff0b16ce2aeecb03f09203.tar.gz rust-2ed980fe253d0b7103ff0b16ce2aeecb03f09203.zip | |
std,extra: remove use of & support for @[].
Diffstat (limited to 'src/libextra')
| -rw-r--r-- | src/libextra/num/bigint.rs | 2 | ||||
| -rw-r--r-- | src/libextra/serialize.rs | 21 |
2 files changed, 1 insertions, 22 deletions
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<D:Decoder,T:Decodable<D>> Decodable<D> for ~[T] { } } -impl<S:Encoder,T:Encodable<S>> Encodable<S> 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<D:Decoder,T:Decodable<D>> Decodable<D> 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<S:Encoder,T:Encodable<S>> Encodable<S> for Option<T> { fn encode(&self, s: &mut S) { s.emit_option(|s| { |
